diff --git a/tests/test_util.py b/tests/test_util.py index 600c014..88ea5d1 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -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') diff --git a/tests/test_xarray_zarr_provider.py b/tests/test_xarray_zarr_provider.py index 539f3d2..6e59906 100644 --- a/tests/test_xarray_zarr_provider.py +++ b/tests/test_xarray_zarr_provider.py @@ -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