Skip to content

Commit 4d252a2

Browse files
dstansbydcherianpre-commit-ci[bot]
authored
Don't draw invalid shapes in test_vindex (#2651)
* Don't draw invalid shapes in test_vindex * Update test_properties.py * style: pre-commit fixes --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9138528 commit 4d252a2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_properties.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import hypothesis.extra.numpy as npst # noqa: E402
88
import hypothesis.strategies as st # noqa: E402
9-
from hypothesis import assume, given # noqa: E402
9+
from hypothesis import given # noqa: E402
1010

1111
from zarr.testing.strategies import arrays, basic_indices, numpy_arrays, zarr_formats # noqa: E402
1212

@@ -34,9 +34,8 @@ def test_basic_indexing(data: st.DataObject) -> None:
3434

3535
@given(data=st.data())
3636
def test_vindex(data: st.DataObject) -> None:
37-
zarray = data.draw(arrays())
3837
# integer_array_indices can't handle 0-size dimensions.
39-
assume(all(s > 0 for s in zarray.shape))
38+
zarray = data.draw(arrays(shapes=npst.array_shapes(max_dims=4, min_side=1)))
4039
nparray = zarray[:]
4140

4241
indexer = data.draw(

0 commit comments

Comments
 (0)