Skip to content

Commit 17cc22d

Browse files
committed
Remove newaxis test workaround
1 parent f2865db commit 17cc22d

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

hypothesis-python/tests/array_api/test_indices.py

-19
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,6 @@ def test_efficiently_generate_indexers(xp, xps):
9494
@given(allow_newaxis=st.booleans(), allow_ellipsis=st.booleans(), data=st.data())
9595
def test_generate_valid_indices(xp, xps, allow_newaxis, allow_ellipsis, data):
9696
"""Strategy generates valid indices."""
97-
try:
98-
import numpy.array_api
99-
except ImportError:
100-
pass
101-
else:
102-
if allow_newaxis and xp is numpy.array_api:
103-
# Special case NumPy due to https://github.com/numpy/numpy/issues/21373
104-
x = xp.ones(5)
105-
try:
106-
x[None, :]
107-
except IndexError:
108-
note("Forcing `allow_newaxis=False` for np.array_api")
109-
allow_newaxis = False
110-
else:
111-
raise AssertionError(
112-
"numpy.array_api looks to now support newaxis indexing, "
113-
"so this try/except/else special case should be removed."
114-
)
115-
11697
shape = data.draw(
11798
xps.array_shapes(min_dims=1, max_side=4)
11899
| xps.array_shapes(min_dims=1, min_side=0, max_side=10),

0 commit comments

Comments
 (0)