Skip to content

Commit

Permalink
added netCDF4 requirement to failing tests (#5564)
Browse files Browse the repository at this point in the history
  • Loading branch information
feefladder authored Jul 17, 2021
1 parent 293613e commit 789f544
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -2770,6 +2770,7 @@ def test_dump_encodings_h5py(self):


@requires_h5netcdf
@requires_netCDF4
class TestH5NetCDFAlreadyOpen:
def test_open_dataset_group(self):
import h5netcdf
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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.
"""
Expand Down
1 change: 1 addition & 0 deletions xarray/tests/test_interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 789f544

Please sign in to comment.