Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/zarr/testing/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
class TestNDArrayLike(np.ndarray):
"""An example of a ndarray-like class"""

__test__ = False


class TestBuffer(cpu.Buffer):
"""Example of a custom Buffer that handles ArrayLike"""

__test__ = False


class NDBufferUsingTestNDArrayLike(cpu.NDBuffer):
"""Example of a custom NDBuffer that handles MyNDArrayLike"""
Expand Down
7 changes: 4 additions & 3 deletions tests/v3/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,14 +785,15 @@ async def test_require_groups(store: LocalStore | MemoryStore, zarr_format: Zarr

async def test_create_dataset(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:
root = await AsyncGroup.create(store=store, zarr_format=zarr_format)
foo = await root.create_dataset("foo", shape=(10,), dtype="uint8")
with pytest.warns(DeprecationWarning):
foo = await root.create_dataset("foo", shape=(10,), dtype="uint8")
assert foo.shape == (10,)

with pytest.raises(ContainsArrayError):
with pytest.raises(ContainsArrayError), pytest.warns(DeprecationWarning):
await root.create_dataset("foo", shape=(100,), dtype="int8")

_ = await root.create_group("bar")
with pytest.raises(ContainsGroupError):
with pytest.raises(ContainsGroupError), pytest.warns(DeprecationWarning):
await root.create_dataset("bar", shape=(100,), dtype="int8")


Expand Down