@@ -2435,10 +2435,16 @@ def test_warning_on_bad_chunks(self) -> None:
2435
2435
for chunks in good_chunks :
2436
2436
kwargs = {"chunks" : chunks }
2437
2437
with assert_no_warnings ():
2438
- with self .roundtrip (original , open_kwargs = kwargs ) as actual :
2439
- for k , v in actual .variables .items ():
2440
- # only index variables should be in memory
2441
- assert v ._in_memory == (k in actual .dims )
2438
+ with warnings .catch_warnings ():
2439
+ warnings .filterwarnings (
2440
+ "ignore" ,
2441
+ message = ".*Zarr version 3 specification.*" ,
2442
+ category = UserWarning ,
2443
+ )
2444
+ with self .roundtrip (original , open_kwargs = kwargs ) as actual :
2445
+ for k , v in actual .variables .items ():
2446
+ # only index variables should be in memory
2447
+ assert v ._in_memory == (k in actual .dims )
2442
2448
2443
2449
@requires_dask
2444
2450
def test_deprecate_auto_chunk (self ) -> None :
@@ -2985,8 +2991,14 @@ def test_save_emptydim(self, chunk) -> None:
2985
2991
def test_no_warning_from_open_emptydim_with_chunks (self ) -> None :
2986
2992
ds = Dataset ({"x" : (("a" , "b" ), np .empty ((5 , 0 )))}).chunk ({"a" : 1 })
2987
2993
with assert_no_warnings ():
2988
- with self .roundtrip (ds , open_kwargs = dict (chunks = {"a" : 1 })) as ds_reload :
2989
- assert_identical (ds , ds_reload )
2994
+ with warnings .catch_warnings ():
2995
+ warnings .filterwarnings (
2996
+ "ignore" ,
2997
+ message = ".*Zarr version 3 specification.*" ,
2998
+ category = UserWarning ,
2999
+ )
3000
+ with self .roundtrip (ds , open_kwargs = dict (chunks = {"a" : 1 })) as ds_reload :
3001
+ assert_identical (ds , ds_reload )
2990
3002
2991
3003
@pytest .mark .parametrize ("consolidated" , [False , True , None ])
2992
3004
@pytest .mark .parametrize ("compute" , [False , True ])
0 commit comments