Skip to content

Commit

Permalink
Test for long sequence warning
Browse files Browse the repository at this point in the history
  • Loading branch information
p-snft committed Aug 26, 2024
1 parent 32f9857 commit f7e72ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_plumbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def test_valid_sequence():
np_array = np.array([0, 1, 2, 3, 4])
assert valid_sequence(np_array, 5)

with pytest.warns(FutureWarning, match="Sequence longer than needed"):
valid_sequence(np_array, 4)

# it's not that long
with pytest.raises(ValueError):
valid_sequence(np_array, 1337)
Expand Down

0 comments on commit f7e72ae

Please sign in to comment.