Skip to content

Commit e2978b9

Browse files
committed
skip cf test on windows, nc4 1.7.1, py 3.12
1 parent e5ca0c2 commit e2978b9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

yt_xarray/tests/test_xr_to_yt.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,22 @@ def test_reversed_axis(stretched, use_callable, chunksizes):
537537
assert np.all(np.isfinite(vals))
538538

539539

540+
def _invalid_nc4_windows():
541+
import sys
542+
543+
import netCDF4
544+
545+
nc4_v = netCDF4.__version__
546+
return "1.7.1" in nc4_v and sys.platform.startswith("win")
547+
548+
540549
def test_cf_xarray_disambiguation():
550+
551+
if _invalid_nc4_windows():
552+
# https://github.com/Unidata/netcdf4-python/issues/1373
553+
# https://github.com/data-exp-lab/yt_xarray/pull/99
554+
pytest.skip("Known nc4, windows endian issue.")
555+
541556
airds = xr.tutorial.open_dataset("air_temperature")
542557
# run the whole selection (will internally run coord disambiguation)
543558
sel = xr2yt.Selection(
@@ -553,6 +568,11 @@ def test_cf_xarray_disambiguation():
553568

554569

555570
def test_missing_cfxarray(monkeypatch):
571+
if _invalid_nc4_windows():
572+
# https://github.com/Unidata/netcdf4-python/issues/1373
573+
# https://github.com/data-exp-lab/yt_xarray/pull/99
574+
pytest.skip("Known nc4, windows endian issue.")
575+
556576
airds = xr.tutorial.open_dataset("air_temperature")
557577

558578
def _bad_import(name, globals=None, locals=None, fromlist=(), level=0):

0 commit comments

Comments
 (0)