Skip to content

Commit b30e524

Browse files
author
Claude Subagent
committed
fix: Use non-deprecated async API in __len__ tests
1 parent c6f250b commit b30e524

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,7 @@ def test_array_len_dimensioned(shape: tuple[int, ...]) -> None:
23112311
@pytest.mark.parametrize("shape", [(10,), (5, 10), (3, 4, 5)])
23122312
async def test_array_len_dimensioned_async(shape: tuple[int, ...]) -> None:
23132313
"""Test __len__ for async dimensioned arrays returns shape[0]."""
2314-
arr = await AsyncArray.create({}, shape=shape, dtype="uint8")
2314+
arr = await zarr.api.asynchronous.create_array({}, shape=shape, dtype="uint8")
23152315
assert len(arr) == shape[0]
23162316

23172317

@@ -2324,6 +2324,6 @@ def test_array_len_0d_raises() -> None:
23242324

23252325
async def test_array_len_0d_raises_async() -> None:
23262326
"""Test __len__ raises TypeError for async 0-dimensional arrays."""
2327-
arr = await AsyncArray.create({}, shape=(), dtype="uint8")
2327+
arr = await zarr.api.asynchronous.create_array({}, shape=(), dtype="uint8")
23282328
with pytest.raises(TypeError, match="len\\(\\) of unsized object"):
23292329
len(arr)

0 commit comments

Comments
 (0)