@@ -3824,25 +3824,22 @@ def skip_if_not_engine(engine):
3824
3824
@requires_dask
3825
3825
@pytest .mark .filterwarnings ("ignore:use make_scale(name) instead" )
3826
3826
@pytest .mark .xfail (reason = "Flaky test. Very open to contributions on fixing this" )
3827
+ @pytest .mark .skipif (ON_WINDOWS , "Skipping on Windows" )
3827
3828
def test_open_mfdataset_manyfiles (
3828
3829
readengine , nfiles , parallel , chunks , file_cache_maxsize
3829
3830
):
3830
3831
# skip certain combinations
3831
3832
skip_if_not_engine (readengine )
3832
3833
3833
- if ON_WINDOWS :
3834
- pytest .skip ("Skipping on Windows" )
3835
-
3836
3834
randdata = np .random .randn (nfiles )
3837
3835
original = Dataset ({"foo" : ("x" , randdata )})
3838
3836
# test standard open_mfdataset approach with too many files
3839
3837
with create_tmp_files (nfiles ) as tmpfiles :
3840
- writeengine = readengine
3841
3838
# split into multiple sets of temp files
3842
3839
for ii in original .x .values :
3843
3840
subds = original .isel (x = slice (ii , ii + 1 ))
3844
- if writeengine != "zarr" :
3845
- subds .to_netcdf (tmpfiles [ii ], engine = writeengine )
3841
+ if readengine != "zarr" :
3842
+ subds .to_netcdf (tmpfiles [ii ], engine = readengine )
3846
3843
else : # if writeengine == "zarr":
3847
3844
subds .to_zarr (store = tmpfiles [ii ])
3848
3845
0 commit comments