@@ -581,6 +581,10 @@ def test_orthogonal_indexing(self):
581
581
actual = on_disk .isel (** indexers )
582
582
assert_identical (expected , actual )
583
583
584
+ @pytest .mark .xfail (
585
+ not has_dask ,
586
+ reason = "the code for indexing without dask handles negative steps in slices incorrectly" ,
587
+ )
584
588
def test_vectorized_indexing (self ):
585
589
in_memory = create_test_data ()
586
590
with self .roundtrip (in_memory ) as on_disk :
@@ -1539,6 +1543,7 @@ def test_roundtrip_consolidated(self):
1539
1543
self .check_dtypes_roundtripped (expected , actual )
1540
1544
assert_identical (expected , actual )
1541
1545
1546
+ @requires_dask
1542
1547
def test_auto_chunk (self ):
1543
1548
original = create_test_data ().chunk ()
1544
1549
@@ -1556,6 +1561,7 @@ def test_auto_chunk(self):
1556
1561
# chunk size should be the same as original
1557
1562
assert v .chunks == original [k ].chunks
1558
1563
1564
+ @requires_dask
1559
1565
@pytest .mark .filterwarnings ("ignore:Specified Dask chunks" )
1560
1566
def test_manual_chunk (self ):
1561
1567
original = create_test_data ().chunk ({"dim1" : 3 , "dim2" : 4 , "dim3" : 3 })
@@ -1598,6 +1604,7 @@ def test_manual_chunk(self):
1598
1604
assert_identical (actual , auto )
1599
1605
assert_identical (actual .load (), auto .load ())
1600
1606
1607
+ @requires_dask
1601
1608
def test_warning_on_bad_chunks (self ):
1602
1609
original = create_test_data ().chunk ({"dim1" : 4 , "dim2" : 3 , "dim3" : 5 })
1603
1610
@@ -1620,6 +1627,7 @@ def test_warning_on_bad_chunks(self):
1620
1627
assert v ._in_memory == (k in actual .dims )
1621
1628
assert len (record ) == 0
1622
1629
1630
+ @requires_dask
1623
1631
def test_deprecate_auto_chunk (self ):
1624
1632
original = create_test_data ().chunk ()
1625
1633
with pytest .warns (FutureWarning ):
@@ -1638,6 +1646,7 @@ def test_deprecate_auto_chunk(self):
1638
1646
# there should be no chunks
1639
1647
assert v .chunks is None
1640
1648
1649
+ @requires_dask
1641
1650
def test_write_uneven_dask_chunks (self ):
1642
1651
# regression for GH#2225
1643
1652
original = create_test_data ().chunk ({"dim1" : 3 , "dim2" : 4 , "dim3" : 3 })
@@ -1662,6 +1671,7 @@ def test_chunk_encoding(self):
1662
1671
with self .roundtrip (data ) as actual :
1663
1672
pass
1664
1673
1674
+ @requires_dask
1665
1675
def test_chunk_encoding_with_dask (self ):
1666
1676
# These datasets DO have dask chunks. Need to check for various
1667
1677
# interactions between dask and zarr chunks
@@ -1896,6 +1906,7 @@ def test_append_with_new_variable(self):
1896
1906
combined ["new_var" ] = ds_with_new_var ["new_var" ]
1897
1907
assert_identical (combined , xr .open_zarr (store_target ))
1898
1908
1909
+ @requires_dask
1899
1910
def test_to_zarr_compute_false_roundtrip (self ):
1900
1911
from dask .delayed import Delayed
1901
1912
@@ -1915,6 +1926,7 @@ def test_to_zarr_compute_false_roundtrip(self):
1915
1926
with self .open (store ) as actual :
1916
1927
assert_identical (original , actual )
1917
1928
1929
+ @requires_dask
1918
1930
def test_to_zarr_append_compute_false_roundtrip (self ):
1919
1931
from dask .delayed import Delayed
1920
1932
@@ -1951,6 +1963,7 @@ def test_to_zarr_append_compute_false_roundtrip(self):
1951
1963
with self .open (store ) as actual :
1952
1964
assert_identical (xr .concat ([ds , ds_to_append ], dim = "time" ), actual )
1953
1965
1966
+ @requires_dask
1954
1967
def test_encoding_chunksizes (self ):
1955
1968
# regression test for GH2278
1956
1969
# see also test_encoding_chunksizes_unlimited
@@ -3513,6 +3526,7 @@ def test_uamiv_format_read(self):
3513
3526
assert_allclose (expected , actual )
3514
3527
camxfile .close ()
3515
3528
3529
+ @requires_dask
3516
3530
def test_uamiv_format_mfread (self ):
3517
3531
"""
3518
3532
Open a CAMx file and test data variables
@@ -3939,6 +3953,9 @@ def test_chunks(self):
3939
3953
ex = expected .sel (band = 1 ).mean (dim = "x" )
3940
3954
assert_allclose (ac , ex )
3941
3955
3956
+ @pytest .mark .xfail (
3957
+ not has_dask , reason = "without dask, a non-serializable lock is used"
3958
+ )
3942
3959
def test_pickle_rasterio (self ):
3943
3960
# regression test for https://github.com/pydata/xarray/issues/2121
3944
3961
with create_tmp_geotiff () as (tmp_file , expected ):
@@ -4012,6 +4029,7 @@ def test_geotiff_tags(self):
4012
4029
with xr .open_rasterio (tmp_file ) as rioda :
4013
4030
assert isinstance (rioda .attrs ["AREA_OR_POINT" ], str )
4014
4031
4032
+ @requires_dask
4015
4033
def test_no_mftime (self ):
4016
4034
# rasterio can accept "filename" urguments that are actually urls,
4017
4035
# including paths to remote files.
0 commit comments