Skip to content

Commit 42b4cb5

Browse files
committed
handle another warning
1 parent fc72752 commit 42b4cb5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/test_metadata/test_consolidated.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,14 @@ async def test_to_dict_order(
497497
await child.create_array("d", shape=(1,), dtype=dtype)
498498

499499
# Consolidate metadata and re-open store
500-
await zarr.api.asynchronous.consolidate_metadata(memory_store)
500+
if zarr_format == 3:
501+
with pytest.warns(
502+
ZarrUserWarning,
503+
match="Consolidated metadata is currently not part in the Zarr format 3 specification.",
504+
):
505+
await zarr.api.asynchronous.consolidate_metadata(memory_store)
506+
else:
507+
await zarr.api.asynchronous.consolidate_metadata(memory_store)
501508
g2 = await zarr.api.asynchronous.open_group(store=memory_store)
502509

503510
assert list(g2.metadata.consolidated_metadata.metadata) == ["a", "b", "c"]

0 commit comments

Comments
 (0)