73
73
has_scipy ,
74
74
has_zarr ,
75
75
has_zarr_v3 ,
76
+ has_zarr_v3_dtypes ,
76
77
mock ,
77
78
network ,
78
79
requires_cftime ,
@@ -2437,7 +2438,7 @@ def test_read_non_consolidated_warning(self) -> None:
2437
2438
def test_non_existent_store (self ) -> None :
2438
2439
with pytest .raises (
2439
2440
FileNotFoundError ,
2440
- match = "(No such file or directory|Unable to find group|No group found)" ,
2441
+ match = "(No such file or directory|Unable to find group|No group found in store )" ,
2441
2442
):
2442
2443
xr .open_zarr (f"{ uuid .uuid4 ()} " )
2443
2444
@@ -2519,6 +2520,7 @@ def test_manual_chunk(self) -> None:
2519
2520
assert_identical (actual .load (), auto .load ())
2520
2521
2521
2522
@requires_dask
2523
+ @pytest .mark .filterwarnings ("ignore:.*does not have a Zarr V3 specification.*" )
2522
2524
def test_warning_on_bad_chunks (self ) -> None :
2523
2525
original = create_test_data ().chunk ({"dim1" : 4 , "dim2" : 3 , "dim3" : 3 })
2524
2526
@@ -2927,7 +2929,9 @@ def test_append_with_existing_encoding_raises(self) -> None:
2927
2929
2928
2930
@pytest .mark .parametrize ("dtype" , ["U" , "S" ])
2929
2931
def test_append_string_length_mismatch_raises (self , dtype ) -> None :
2930
- skip_if_zarr_format_3 ("This actually works fine with Zarr format 3" )
2932
+ if has_zarr_v3 and not has_zarr_v3_dtypes :
2933
+ skip_if_zarr_format_3 ("This actually works fine with Zarr format 3" )
2934
+
2931
2935
ds , ds_to_append = create_append_string_length_mismatch_test_data (dtype )
2932
2936
with self .create_zarr_target () as store_target :
2933
2937
ds .to_zarr (store_target , mode = "w" , ** self .version_kwargs )
@@ -2940,8 +2944,12 @@ def test_append_string_length_mismatch_raises(self, dtype) -> None:
2940
2944
def test_append_string_length_mismatch_works (self , dtype ) -> None :
2941
2945
skip_if_zarr_format_2 ("This doesn't work with Zarr format 2" )
2942
2946
# ...but it probably would if we used object dtype
2947
+ if has_zarr_v3_dtypes :
2948
+ pytest .skip ("This works on pre ZDtype Zarr-Python, but fails after." )
2949
+
2943
2950
ds , ds_to_append = create_append_string_length_mismatch_test_data (dtype )
2944
2951
expected = xr .concat ([ds , ds_to_append ], dim = "time" )
2952
+
2945
2953
with self .create_zarr_target () as store_target :
2946
2954
ds .to_zarr (store_target , mode = "w" , ** self .version_kwargs )
2947
2955
ds_to_append .to_zarr (store_target , append_dim = "time" , ** self .version_kwargs )
0 commit comments