Skip to content

Commit 4dba40c

Browse files
maxrjonesd-v-b
andauthored
Apply suggestions from code review
Co-authored-by: Davis Bennett <[email protected]>
1 parent dd0de05 commit 4dba40c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/zarr/storage/_fsspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ async def set(
255255
await self._open()
256256
self._check_writable()
257257
if not isinstance(value, Buffer):
258-
raise TypeError("FsspecStore.set(): `value` must a Buffer instance")
258+
raise TypeError(f"FsspecStore.set(): `value` must a Buffer instance. Got an instance of {type(value)} instead.")
259259
path = _dereference_path(self.path, key)
260260
# write data
261261
if byte_range:

src/zarr/testing/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ async def test_set_many(self, store: S) -> None:
262262
for k, v in store_dict.items():
263263
assert (await self.get(store, k)).to_bytes() == v.to_bytes()
264264

265-
async def test_set_raises(self, store: S) -> None:
265+
async def test_set_invalid_buffer(self, store: S) -> None:
266266
"""
267267
Ensure that set raises a Type or Value Error for invalid buffer arguments.
268268
"""

tests/test_store/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@pytest.mark.parametrize("zarr_format", [2, 3])
1616
async def test_contains_group(local_store, write_group: bool, zarr_format: ZarrFormat) -> None:
1717
"""
18-
Test contains group method
18+
Test that the contains_group method correctly reports the existence of a group.
1919
"""
2020
root = Group.from_store(store=local_store, zarr_format=zarr_format)
2121
if write_group:
@@ -28,7 +28,7 @@ async def test_contains_group(local_store, write_group: bool, zarr_format: ZarrF
2828
@pytest.mark.parametrize("zarr_format", [2, 3])
2929
async def test_contains_array(local_store, write_array: bool, zarr_format: ZarrFormat) -> None:
3030
"""
31-
Test contains group method
31+
Test that the contains array method correctly reports the existence of an array.
3232
"""
3333
root = Group.from_store(store=local_store, zarr_format=zarr_format)
3434
if write_array:

tests/test_store/test_local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_invalid_root_raises(self):
6161

6262
async def test_get_with_prototype_default(self, store: LocalStore):
6363
"""
64-
Ensure that data can be read using the default prototype method.
64+
Ensure that data can be read via ``store.get`` if the prototype keyword argument is unspecified, i.e. set to ``None``.
6565
"""
6666
data_buf = self.buffer_cls.from_bytes(b"\x01\x02\x03\x04")
6767
key = "c/0"

0 commit comments

Comments
 (0)