Skip to content

Commit

Permalink
Specifically predicate np.newaxis (not None) in indices tests
Browse files Browse the repository at this point in the history
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
  • Loading branch information
honno and Zac-HD committed Aug 28, 2021
1 parent 8e7117a commit 6758426
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hypothesis-python/tests/numpy/test_gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,8 @@ def test_advanced_integer_index_can_generate_any_pattern(shape, data):
[
lambda ix: Ellipsis in ix,
lambda ix: Ellipsis not in ix,
lambda ix: None in ix,
lambda ix: None not in ix,
lambda ix: np.newaxis in ix,
lambda ix: np.newaxis not in ix,
],
)
def test_basic_indices_options(condition):
Expand Down Expand Up @@ -1121,7 +1121,7 @@ def test_basic_indices_generate_valid_indexers(
assert 0 <= len(indexer) <= len(shape) + int(allow_ellipsis)
else:
assert 1 <= len(shape) + int(allow_ellipsis)
assert None not in shape
assert np.newaxis not in shape
if not allow_ellipsis:
assert Ellipsis not in shape

Expand Down

0 comments on commit 6758426

Please sign in to comment.