diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 0a287066957..ed4b80587e5 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -2770,6 +2770,7 @@ def test_dump_encodings_h5py(self): @requires_h5netcdf +@requires_netCDF4 class TestH5NetCDFAlreadyOpen: def test_open_dataset_group(self): import h5netcdf @@ -2854,6 +2855,7 @@ def test_open_twice(self): with open_dataset(f, engine="h5netcdf"): pass + @requires_scipy def test_open_fileobj(self): # open in-memory datasets instead of local file paths expected = create_test_data().drop_vars("dim3") @@ -5155,11 +5157,12 @@ def test_open_fsspec(): @requires_h5netcdf +@requires_netCDF4 def test_load_single_value_h5netcdf(tmp_path): """Test that numeric single-element vector attributes are handled fine. At present (h5netcdf v0.8.1), the h5netcdf exposes single-valued numeric variable - attributes as arrays of length 1, as oppesed to scalars for the NetCDF4 + attributes as arrays of length 1, as opposed to scalars for the NetCDF4 backend. This was leading to a ValueError upon loading a single value from a file, see #4471. Test that loading causes no failure. """ diff --git a/xarray/tests/test_interp.py b/xarray/tests/test_interp.py index 4f6dc616504..2029e6af05b 100644 --- a/xarray/tests/test_interp.py +++ b/xarray/tests/test_interp.py @@ -727,6 +727,7 @@ def test_datetime_interp_noerror(): @requires_cftime +@requires_scipy def test_3641(): times = xr.cftime_range("0001", periods=3, freq="500Y") da = xr.DataArray(range(3), dims=["time"], coords=[times])