move numpy based tests to xarray/zarr provider (#1042)

This commit is contained in:
Tom Kralidis
2022-11-20 19:31:20 -05:00
committed by GitHub
parent ba15a8a4fe
commit fdf19c5f29
2 changed files with 11 additions and 7 deletions
-7
View File
@@ -29,7 +29,6 @@
from datetime import datetime, date, time
from decimal import Decimal
from numpy import float64, int64
import pytest
@@ -88,12 +87,6 @@ def test_json_serial():
d = Decimal(1.0)
assert util.json_serial(d) == 1.0
d = int64(500_000_000_000)
assert util.json_serial(d) == 500_000_000_000
d = float64(500.00000005)
assert util.json_serial(d) == 500.00000005
with pytest.raises(TypeError):
util.json_serial('foo')
+11
View File
@@ -27,9 +27,12 @@
#
# =================================================================
from numpy import float64, int64
import pytest
from pygeoapi.provider.xarray_ import XarrayProvider
from pygeoapi.util import json_serial
from .util import get_test_file_path
@@ -86,3 +89,11 @@ def test_query(config):
data = p.query(format_='zarr')
assert isinstance(data, bytes)
def test_numpy_json_serial():
d = int64(500_000_000_000)
assert json_serial(d) == 500_000_000_000
d = float64(500.00000005)
assert json_serial(d) == 500.00000005