Skip to content

Commit 74e4d9d

Browse files
committed
test_array_repr
1 parent b3f313d commit 74e4d9d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/test_array.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ async def test_v3_chunk_encoding(
11381138
async def test_chunk_key_encoding(
11391139
name: str, separator: str, zarr_format: ZarrFormat, store: MemoryStore
11401140
) -> None:
1141-
chunk_key_encoding = ChunkKeyEncodingParams(name=name, separator=separator) # type: ignore[arg-type]
1141+
chunk_key_encoding = ChunkKeyEncodingParams(name=name, separator=separator) # type: ignore[typeddict-item"]
11421142
error_msg = ""
11431143
if name == "invalid":
11441144
error_msg = "Unknown chunk key encoding."
@@ -1661,3 +1661,14 @@ async def test_sharding_coordinate_selection() -> None:
16611661
result = arr[1, [0, 1]] # type: ignore[index]
16621662
assert isinstance(result, NDArrayLike)
16631663
assert (result == np.array([[12, 13, 14, 15], [16, 17, 18, 19]])).all()
1664+
1665+
@pytest.mark.parametrize("store", ["local", "memory", "zip"], indirect=["store"])
1666+
def test_array_repr(store: Store) -> None:
1667+
shape = (2, 3, 4)
1668+
dtype = "uint8"
1669+
arr = zarr.create_array(
1670+
store,
1671+
shape=shape,
1672+
dtype=dtype
1673+
)
1674+
assert str(arr) == f"<Array {store} shape={shape} dtype={dtype}>"

0 commit comments

Comments
 (0)