@@ -1643,7 +1643,7 @@ async def test_create_rooted_hierarchy_group(store: Store, zarr_format, path: st
16431643 )
16441644 for node_name in group_names
16451645 }
1646-
1646+
16471647 arrays_expected_meta = {
16481648 _join_paths ([root_key , node_name ]): meta_from_array (np .zeros (4 ), zarr_format = zarr_format )
16491649 for node_name in array_names
@@ -1662,19 +1662,21 @@ async def test_create_rooted_hierarchy_group(store: Store, zarr_format, path: st
16621662 }
16631663 assert members_observed_meta == members_expected_meta_relative
16641664
1665+
16651666@pytest .mark .parametrize ("store" , ["memory" , "local" ], indirect = True )
16661667def test_create_hierarchy_implicit_groups (store : Store ):
1667- spath = sync (make_store_path (store , path = '' ))
1668+ spath = sync (make_store_path (store , path = "" ))
16681669 nodes = {
1669- '' : GroupMetadata (zarr_format = 3 , attributes = {' implicit' : False }),
1670- ' a/b/c' : GroupMetadata (zarr_format = 3 , attributes = {' implicit' : False })
1671- }
1672-
1670+ "" : GroupMetadata (zarr_format = 3 , attributes = {" implicit" : False }),
1671+ " a/b/c" : GroupMetadata (zarr_format = 3 , attributes = {" implicit" : False }),
1672+ }
1673+
16731674 hierarchy_parsed = _parse_hierarchy_dict (nodes )
16741675 g = _create_rooted_hierarchy_sync (spath , nodes = nodes )
16751676 for key , value in hierarchy_parsed .items ():
16761677 assert g [key ].metadata .attributes == value .attributes
16771678
1679+
16781680# TODO: simplify testing sync versions of async functions.
16791681@pytest .mark .parametrize ("store" , ["memory" , "local" ], indirect = True )
16801682@pytest .mark .parametrize ("zarr_format" , [2 , 3 ])
@@ -1738,11 +1740,14 @@ async def test_create_rooted_hierarchy_array(store: Store, zarr_format, path: st
17381740 assert isinstance (a , AsyncArray )
17391741 assert a .metadata .attributes == {"path" : root_key }
17401742
1743+
17411744@pytest .mark .parametrize ("store" , ["memory" , "local" ], indirect = True )
17421745@pytest .mark .parametrize ("zarr_format" , [2 , 3 ])
17431746@pytest .mark .parametrize ("root_key" , ["" , "root" ])
17441747@pytest .mark .parametrize ("path" , ["" , "foo" ])
1745- async def test_create_rooted_hierarchy_sync_array (store : Store , zarr_format , path : str , root_key : str ):
1748+ async def test_create_rooted_hierarchy_sync_array (
1749+ store : Store , zarr_format , path : str , root_key : str
1750+ ):
17461751 """
17471752 Test that _create_rooted_hierarchy_sync can create an array.
17481753 """
@@ -1755,12 +1760,11 @@ async def test_create_rooted_hierarchy_sync_array(store: Store, zarr_format, pat
17551760
17561761 nodes_create = root_meta
17571762
1758- a = _create_rooted_hierarchy_sync (spath , nodes = nodes_create , overwrite = True )
1763+ a = _create_rooted_hierarchy_sync (spath , nodes = nodes_create , overwrite = True )
17591764 assert isinstance (a , Array )
17601765 assert a .metadata .attributes == {"path" : root_key }
17611766
17621767
1763-
17641768async def test_create_rooted_hierarchy_invalid ():
17651769 """
17661770 Ensure _create_rooted_hierarchy will raise a ValueError if the input does not contain
0 commit comments