Skip to content

Commit e58350b

Browse files
committed
check h5netcdf 1.3.0 available for test
1 parent 5e43a58 commit e58350b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

xarray/tests/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ def _importorskip(
9595
requires_pandas_version_two = pytest.mark.skipif(
9696
not has_pandas_version_two, reason="requires pandas 2.0.0"
9797
)
98+
has_h5netcdf_ros3 = _importorskip("h5netcdf", "1.3.0")
99+
requires_h5netcdf_ros3 = pytest.mark.skipif(
100+
not has_h5netcdf_ros3[0], reason="requires h5netcdf 1.3.0"
101+
)
98102

99103
# change some global options for tests
100104
set_options(warn_for_unclosed_files=True)

xarray/tests/test_backends.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
requires_scipy,
7878
requires_scipy_or_netCDF4,
7979
requires_zarr,
80+
requires_h5netcdf_ros3,
8081
)
8182
from xarray.tests.test_coding_times import (
8283
_ALL_CALENDARS,
@@ -3444,7 +3445,7 @@ def test_write_inconsistent_chunks(self) -> None:
34443445
assert actual["y"].encoding["chunksizes"] == (100, 50)
34453446

34463447

3447-
@requires_h5netcdf
3448+
@requires_h5netcdf_ros3
34483449
class TestH5NetCDFDataRos3Driver(TestCommon):
34493450
engine: T_NetcdfEngine = "h5netcdf"
34503451
test_remote_dataset: str = (

0 commit comments

Comments
 (0)