From c4935c13763ae6936af411419ca8924ff4d20804 Mon Sep 17 00:00:00 2001 From: snowman2 Date: Mon, 6 Jul 2020 08:44:51 -0500 Subject: [PATCH 1/2] TST: Update test_nc_attr_loading with values based on recent GDAL --- test/integration/test_integration__io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/test_integration__io.py b/test/integration/test_integration__io.py index 2dc0834e..93968441 100644 --- a/test/integration/test_integration__io.py +++ b/test/integration/test_integration__io.py @@ -942,5 +942,5 @@ def test_nc_attr_loading(): "units": "seconds since 2016-12-19T10:27:29.687763", "calendar": "proleptic_gregorian", } - assert str(rds.time.values[0]) == "2016-12-19 10:27:29" - assert str(rds.time.values[1]) == "2016-12-29 12:52:41.659696" + assert str(rds.time.values[0]) == "2016-12-19 10:27:29.687763" + assert str(rds.time.values[1]) == "2016-12-29 12:52:42.347451" From d533753fbd891eeb704c8f55e551885f7a4652b3 Mon Sep 17 00:00:00 2001 From: snowman2 Date: Mon, 6 Jul 2020 08:54:40 -0500 Subject: [PATCH 2/2] xfail based on GDAL version --- test/integration/test_integration__io.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/integration/test_integration__io.py b/test/integration/test_integration__io.py index 93968441..0b12e4ac 100644 --- a/test/integration/test_integration__io.py +++ b/test/integration/test_integration__io.py @@ -6,6 +6,7 @@ import sys import tempfile import warnings +from distutils.version import LooseVersion import dask.array as da import mock @@ -930,6 +931,10 @@ def test_notgeoreferenced_warning(): rioxarray.open_rasterio(tmp_file) +@pytest.mark.xfail( + LooseVersion(rasterio.__gdal_version__) < LooseVersion("3.0.4"), + reason="This was fixed in GDAL 3.0.4", +) def test_nc_attr_loading(): with rioxarray.open_rasterio( os.path.join(TEST_INPUT_DATA_DIR, "PLANET_SCOPE_3D.nc")