Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added netCDF4 requirement to failing tests #5564

Merged
merged 2 commits into from
Jul 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 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 @@ -2861,6 +2862,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 @@ -5162,11 +5164,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