@@ -369,8 +369,6 @@ def create_store(self):
369
369
def roundtrip (
370
370
self , data , save_kwargs = None , open_kwargs = None , allow_cleanup_failure = False
371
371
):
372
- print (save_kwargs )
373
- print (open_kwargs )
374
372
if save_kwargs is None :
375
373
save_kwargs = {}
376
374
if open_kwargs is None :
@@ -928,9 +926,6 @@ def test_roundtrip_bytes_with_fill_value(self) -> None:
928
926
encoding = {"_FillValue" : b"X" , "dtype" : "S1" }
929
927
original = Dataset ({"x" : ("t" , values , {}, encoding )})
930
928
expected = original .copy (deep = True )
931
- zarr_format_3 = has_zarr_v3 and zarr .config .config ["default_zarr_format" ] == 3
932
- print (zarr_format_3 )
933
- print (self .version_kwargs )
934
929
with self .roundtrip (original ) as actual :
935
930
assert_identical (expected , actual )
936
931
@@ -2368,7 +2363,6 @@ def create_store(self, cache_members: bool = False):
2368
2363
)
2369
2364
2370
2365
def save (self , dataset , store_target , ** kwargs ): # type: ignore[override]
2371
- print ("ver kwargs" , self .version_kwargs )
2372
2366
return dataset .to_zarr (store = store_target , ** kwargs , ** self .version_kwargs )
2373
2367
2374
2368
@contextlib .contextmanager
@@ -2422,7 +2416,7 @@ def test_read_non_consolidated_warning(self) -> None:
2422
2416
def test_non_existent_store (self ) -> None :
2423
2417
with pytest .raises (
2424
2418
FileNotFoundError ,
2425
- match = "(No such file or directory|Unable to find group|No group found)" ,
2419
+ match = "(No such file or directory|Unable to find group|No group found in store )" ,
2426
2420
):
2427
2421
xr .open_zarr (f"{ uuid .uuid4 ()} " )
2428
2422
@@ -2504,6 +2498,7 @@ def test_manual_chunk(self) -> None:
2504
2498
assert_identical (actual .load (), auto .load ())
2505
2499
2506
2500
@requires_dask
2501
+ @pytest .mark .filterwarnings ("ignore:.*does not have a Zarr V3 specification.*" )
2507
2502
def test_warning_on_bad_chunks (self ) -> None :
2508
2503
original = create_test_data ().chunk ({"dim1" : 4 , "dim2" : 3 , "dim3" : 3 })
2509
2504
@@ -2912,7 +2907,6 @@ def test_append_with_existing_encoding_raises(self) -> None:
2912
2907
2913
2908
@pytest .mark .parametrize ("dtype" , ["U" , "S" ])
2914
2909
def test_append_string_length_mismatch_raises (self , dtype ) -> None :
2915
- skip_if_zarr_format_3 ("This actually works fine with Zarr format 3" )
2916
2910
ds , ds_to_append = create_append_string_length_mismatch_test_data (dtype )
2917
2911
with self .create_zarr_target () as store_target :
2918
2912
ds .to_zarr (store_target , mode = "w" , ** self .version_kwargs )
@@ -2921,18 +2915,6 @@ def test_append_string_length_mismatch_raises(self, dtype) -> None:
2921
2915
store_target , append_dim = "time" , ** self .version_kwargs
2922
2916
)
2923
2917
2924
- @pytest .mark .parametrize ("dtype" , ["U" , "S" ])
2925
- def test_append_string_length_mismatch_works (self , dtype ) -> None :
2926
- skip_if_zarr_format_2 ("This doesn't work with Zarr format 2" )
2927
- # ...but it probably would if we used object dtype
2928
- ds , ds_to_append = create_append_string_length_mismatch_test_data (dtype )
2929
- expected = xr .concat ([ds , ds_to_append ], dim = "time" )
2930
- with self .create_zarr_target () as store_target :
2931
- ds .to_zarr (store_target , mode = "w" , ** self .version_kwargs )
2932
- ds_to_append .to_zarr (store_target , append_dim = "time" , ** self .version_kwargs )
2933
- actual = xr .open_dataset (store_target , engine = "zarr" )
2934
- xr .testing .assert_identical (expected , actual )
2935
-
2936
2918
def test_check_encoding_is_consistent_after_append (self ) -> None :
2937
2919
ds , ds_to_append , _ = create_append_test_data ()
2938
2920
@@ -3014,6 +2996,11 @@ def test_append_with_append_dim_no_overwrite(self) -> None:
3014
2996
original2 ["lon" ] = lon
3015
2997
assert_identical (original2 , actual )
3016
2998
2999
+ def test_minimal_round (self ) -> None :
3000
+ ds = create_test_data ()
3001
+ with self .roundtrip (ds ) as ds_reload :
3002
+ assert_identical (ds , ds_reload )
3003
+
3017
3004
@requires_dask
3018
3005
def test_to_zarr_compute_false_roundtrip (self ) -> None :
3019
3006
from dask .delayed import Delayed
@@ -3838,10 +3825,6 @@ def roundtrip_dir(
3838
3825
if open_kwargs is None :
3839
3826
open_kwargs = {}
3840
3827
3841
- print ("here?" )
3842
- print (save_kwargs )
3843
- print (self .version_kwargs )
3844
- print (open_kwargs )
3845
3828
data .to_zarr (store , ** save_kwargs , ** self .version_kwargs )
3846
3829
with xr .open_dataset (
3847
3830
store , engine = "zarr" , ** open_kwargs , ** self .version_kwargs
0 commit comments