Skip to content

Commit 789f544

Browse files
authored
added netCDF4 requirement to failing tests (#5564)
1 parent 293613e commit 789f544

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

xarray/tests/test_backends.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2770,6 +2770,7 @@ def test_dump_encodings_h5py(self):
27702770

27712771

27722772
@requires_h5netcdf
2773+
@requires_netCDF4
27732774
class TestH5NetCDFAlreadyOpen:
27742775
def test_open_dataset_group(self):
27752776
import h5netcdf
@@ -2854,6 +2855,7 @@ def test_open_twice(self):
28542855
with open_dataset(f, engine="h5netcdf"):
28552856
pass
28562857

2858+
@requires_scipy
28572859
def test_open_fileobj(self):
28582860
# open in-memory datasets instead of local file paths
28592861
expected = create_test_data().drop_vars("dim3")
@@ -5155,11 +5157,12 @@ def test_open_fsspec():
51555157

51565158

51575159
@requires_h5netcdf
5160+
@requires_netCDF4
51585161
def test_load_single_value_h5netcdf(tmp_path):
51595162
"""Test that numeric single-element vector attributes are handled fine.
51605163
51615164
At present (h5netcdf v0.8.1), the h5netcdf exposes single-valued numeric variable
5162-
attributes as arrays of length 1, as oppesed to scalars for the NetCDF4
5165+
attributes as arrays of length 1, as opposed to scalars for the NetCDF4
51635166
backend. This was leading to a ValueError upon loading a single value from
51645167
a file, see #4471. Test that loading causes no failure.
51655168
"""

xarray/tests/test_interp.py

+1
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ def test_datetime_interp_noerror():
727727

728728

729729
@requires_cftime
730+
@requires_scipy
730731
def test_3641():
731732
times = xr.cftime_range("0001", periods=3, freq="500Y")
732733
da = xr.DataArray(range(3), dims=["time"], coords=[times])

0 commit comments

Comments
 (0)