Skip to content

Commit c42b681

Browse files
committed
Test for negative depth
1 parent 7d02b6d commit c42b681

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_group.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,9 @@ async def test_group_members_async(store: Store, consolidated_metadata: bool) ->
11311131
assert len(all_children) == 4
11321132
nmembers = await group.nmembers(max_depth=None)
11331133
assert nmembers == 4
1134+
# test depth<0
1135+
with pytest.raises(ValueError, match="max_depth"):
1136+
await group.nmembers(max_depth=-1)
11341137

11351138

11361139
async def test_require_group(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:

0 commit comments

Comments
 (0)