@@ -537,9 +537,23 @@ 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+
540549def test_cf_xarray_disambiguation ():
541- from cf_xarray .datasets import airds
542550
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+
556+ airds = xr .tutorial .open_dataset ("air_temperature" )
543557 # run the whole selection (will internally run coord disambiguation)
544558 sel = xr2yt .Selection (
545559 airds , fields = ["air" ], sel_dict = {"time" : 0 }, sel_dict_type = "isel"
@@ -554,7 +568,12 @@ def test_cf_xarray_disambiguation():
554568
555569
556570def test_missing_cfxarray (monkeypatch ):
557- from cf_xarray .datasets import airds
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+
576+ airds = xr .tutorial .open_dataset ("air_temperature" )
558577
559578 def _bad_import (name , globals = None , locals = None , fromlist = (), level = 0 ):
560579 raise ImportError
0 commit comments