Skip to content

Commit

Permalink
xfail running test_generate_valid_indices for numpy.array_api
Browse files Browse the repository at this point in the history
  • Loading branch information
honno committed Apr 21, 2022
1 parent af2514b commit bd6d62b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hypothesis-python/tests/array_api/test_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ def test_efficiently_generate_indexers(xp, xps):
@given(allow_newaxis=st.booleans(), allow_ellipsis=st.booleans(), data=st.data())
def test_generate_valid_indices(xp, xps, allow_newaxis, allow_ellipsis, data):
"""Strategy generates valid indices."""
try:
from numpy import array_api as nxp

if xp == nxp:
pytest.xfail(
"numpy.array_api arrays do not currently support newaxis indexing"
)
except ImportError:
pass

shape = data.draw(
xps.array_shapes(min_dims=1, max_side=4)
| xps.array_shapes(min_dims=1, min_side=0, max_side=10),
Expand Down

0 comments on commit bd6d62b

Please sign in to comment.