Skip to content

Commit 26ca2d4

Browse files
committed
improve test
1 parent d4ffe9f commit 26ca2d4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/v3/test_array.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,13 +408,13 @@ def test_vlen_errors() -> None:
408408
)
409409

410410

411-
def test_update_attrs() -> None:
411+
@pytest.mark.parametrize("zarr_format", [2, 3])
412+
def test_update_attrs(zarr_format: int) -> None:
412413
# regression test for https://github.com/zarr-developers/zarr-python/issues/2328
413-
arr = Array.create(
414-
MemoryStore({}, mode="w"),
415-
shape=5,
416-
chunk_shape=5,
417-
dtype="f8",
418-
)
414+
store = MemoryStore({}, mode="w")
415+
arr = Array.create(store=store, shape=5, chunk_shape=5, dtype="f8", zarr_format=zarr_format)
419416
arr.attrs["foo"] = "bar"
420417
assert arr.attrs["foo"] == "bar"
418+
419+
arr2 = zarr.open_array(store=store, zarr_format=zarr_format)
420+
assert arr2.attrs["foo"] == "bar"

0 commit comments

Comments
 (0)