Skip to content

Commit e792e01

Browse files
committed
Make test more readable
1 parent 06f35f2 commit e792e01

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/test_store/test_fsspec.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
from typing import TYPE_CHECKING
66

7+
import numpy as np
78
import pytest
89
from packaging.version import parse as parse_version
910

@@ -110,12 +111,12 @@ def test_open_s3map() -> None:
110111
mapper = s3_filesystem.get_mapper(f"s3://{test_bucket_name}/map/foo/")
111112
arr = zarr.open(store=mapper, mode="w", shape=(3, 3))
112113
assert isinstance(arr, Array)
113-
114-
arr[...] = 3
115-
z2 = zarr.open(store=mapper, mode="w", shape=(3, 3))
116-
assert isinstance(z2, Array)
117-
assert not (z2[:] == 3).all()
118-
z2[:] = 3
114+
# Set values
115+
arr[:] = 1
116+
# Read set values
117+
arr = zarr.open(store=mapper, mode="r", shape=(3, 3))
118+
assert isinstance(arr, Array)
119+
np.testing.assert_array_equal(np.ones((3, 3)), arr[:])
119120

120121

121122
def test_open_s3map_raises() -> None:

0 commit comments

Comments
 (0)