Skip to content

Commit d1e805f

Browse files
committed
parametrize test with array path, and trigger failures
1 parent fc9b3f8 commit d1e805f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_array.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,13 @@ async def test_nchunks_initialized(test_cls: type[Array] | type[AsyncArray[Any]]
386386
assert observed == expected
387387

388388

389-
async def test_chunks_initialized() -> None:
389+
@pytest.mark.parametrize("path", ["", "foo"])
390+
async def test_chunks_initialized(path: str) -> None:
390391
"""
391392
Test that chunks_initialized accurately returns the keys of stored chunks.
392393
"""
393394
store = MemoryStore()
394-
arr = zarr.create_array(store, shape=(100,), chunks=(10,), dtype="i4")
395+
arr = zarr.create_array(store, name=path, shape=(100,), chunks=(10,), dtype="i4")
395396

396397
chunks_accumulated = tuple(
397398
accumulate(tuple(tuple(v.split(" ")) for v in arr._iter_chunk_keys()))

0 commit comments

Comments
 (0)