8000 Fixed test warnings (#2168) · zarr-developers/zarr-python@8403438 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8403438

Browse files
Fixed test warnings (#2168)
1 parent c2d50a6 commit 8403438

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/zarr/testing/buffer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525
class TestNDArrayLike(np.ndarray):
2626
"""An example of a ndarray-like class"""
2727

28+
__test__ = False
29+
2830

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

34+
__test__ = False
35+
3236

3337
class NDBufferUsingTestNDArrayLike(cpu.NDBuffer):
3438
"""Example of a custom NDBuffer that handles MyNDArrayLike"""

tests/v3/test_group.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,14 +785,15 @@ async def test_require_groups(store: LocalStore | MemoryStore, zarr_format: Zarr
785785

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

791-
with pytest.raises(ContainsArrayError):
792+
with pytest.raises(ContainsArrayError), pytest.warns(DeprecationWarning):
792793
await root.create_dataset("foo", shape=(100,), dtype="int8")
793794

794795
_ = await root.create_group("bar")
795-
with pytest.raises(ContainsGroupError):
796+
with pytest.raises(ContainsGroupError), pytest.warns(DeprecationWarning):
796797
await root.create_dataset("bar", shape=(100,), dtype="int8")
797798

798799

0 commit comments

Comments
 (0)
0