Skip to content

Commit

Permalink
Catch edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
thangleiter committed May 10, 2021
1 parent 7c6155d commit d43e184
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_sequencing.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ def test_slicing(self):

# Boolean indices
ix = rng.integers(0, 2, size=n, dtype=bool)
self.assertEqual(pulse[ix], ff.concatenate(parts[ix]))
if not ix.any():
with self.assertRaises(IndexError):
pulse[ix]
else:
self.assertEqual(pulse[ix], ff.concatenate(parts[ix]))

# Raises
with self.assertRaises(IndexError):
Expand Down

0 comments on commit d43e184

Please sign in to comment.