Skip to content

Commit

Permalink
check h5netcdf 1.3.0 available for test
Browse files Browse the repository at this point in the history
  • Loading branch information
zequihg50 committed Nov 14, 2023
1 parent 5e43a58 commit e58350b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions xarray/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def _importorskip(
requires_pandas_version_two = pytest.mark.skipif(
not has_pandas_version_two, reason="requires pandas 2.0.0"
)
has_h5netcdf_ros3 = _importorskip("h5netcdf", "1.3.0")
requires_h5netcdf_ros3 = pytest.mark.skipif(
not has_h5netcdf_ros3[0], reason="requires h5netcdf 1.3.0"
)

# change some global options for tests
set_options(warn_for_unclosed_files=True)
Expand Down
3 changes: 2 additions & 1 deletion xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
requires_scipy,
requires_scipy_or_netCDF4,
requires_zarr,
requires_h5netcdf_ros3,
)
from xarray.tests.test_coding_times import (
_ALL_CALENDARS,
Expand Down Expand Up @@ -3444,7 +3445,7 @@ def test_write_inconsistent_chunks(self) -> None:
assert actual["y"].encoding["chunksizes"] == (100, 50)


@requires_h5netcdf
@requires_h5netcdf_ros3
class TestH5NetCDFDataRos3Driver(TestCommon):
engine: T_NetcdfEngine = "h5netcdf"
test_remote_dataset: str = (
Expand Down

0 comments on commit e58350b

Please sign in to comment.