Skip to content

Commit

Permalink
added netCDF4 requirement to failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeperdefloep committed Jul 2, 2021
1 parent c472f8a commit a874739
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -2777,6 +2777,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 @@ -5162,11 +5163,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

0 comments on commit a874739

Please sign in to comment.