@@ -229,22 +229,23 @@ async def test_open_group_unspecified_version(
229229@pytest .mark .parametrize ("store" , ["local" , "memory" , "zip" ], indirect = ["store" ])
230230@pytest .mark .parametrize ("n_args" , [10 , 1 , 0 ])
231231@pytest .mark .parametrize ("n_kwargs" , [10 , 1 , 0 ])
232- def test_save (store : Store , n_args : int , n_kwargs : int ) -> None :
232+ @pytest .mark .parametrize ("path" , [None , "some_path" ])
233+ def test_save (store : Store , n_args : int , n_kwargs : int , path : None | str ) -> None :
233234 data = np .arange (10 )
234235 args = [np .arange (10 ) for _ in range (n_args )]
235236 kwargs = {f"arg_{ i } " : data for i in range (n_kwargs )}
236237
237238 if n_kwargs == 0 and n_args == 0 :
238239 with pytest .raises (ValueError ):
239- save (store )
240+ save (store , path = path )
240241 elif n_args == 1 and n_kwargs == 0 :
241- save (store , * args )
242- array = zarr .api .synchronous .open (store )
242+ save (store , * args , path = path )
243+ array = zarr .api .synchronous .open (store , path = path )
243244 assert isinstance (array , Array )
244245 assert_array_equal (array [:], data )
245246 else :
246- save (store , * args , ** kwargs ) # type: ignore [arg-type]
247- group = zarr .api .synchronous .open (store )
247+ save (store , * args , path = path , ** kwargs ) # type: ignore [arg-type]
248+ group = zarr .api .synchronous .open (store , path = path )
248249 assert isinstance (group , Group )
249250 for array in group .array_values ():
250251 assert_array_equal (array [:], data )
@@ -384,8 +385,8 @@ def test_array_order_warns(order: MemoryOrder | None, zarr_format: ZarrFormat) -
384385# assert "LazyLoader: " in repr(loader)
385386
386387
387- def test_load_array (memory_store : Store ) -> None :
388- store = memory_store
388+ def test_load_array (sync_store : Store ) -> None :
389+ store = sync_store
389390 foo = np .arange (100 )
390391 bar = np .arange (100 , 0 , - 1 )
391392 save (store , foo = foo , bar = bar )
0 commit comments