Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Update test_nc_attr_loading with values based on recent GDAL #158

Merged
merged 2 commits into from
Jul 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/integration/test_integration__io.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
import tempfile
import warnings
from distutils.version import LooseVersion

import dask.array as da
import mock
Expand Down Expand Up @@ -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")
Expand All @@ -942,5 +947,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"