Skip to content

Commit

Permalink
update slice_bits test to use IndexError
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddins-ibm committed Jul 10, 2024
1 parent 8f32178 commit c2b0039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/python/primitives/containers/test_bit_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ def test_slice_bits(self):
self.assertEqual(ba2.get_counts((i, j, k)), expect)

with self.subTest("errors"):
with self.assertRaisesRegex(ValueError, "index -1 is out of bounds"):
with self.assertRaisesRegex(IndexError, "index -1 is out of bounds"):
_ = ba.slice_bits(-1)
with self.assertRaisesRegex(ValueError, "index 9 is out of bounds"):
with self.assertRaisesRegex(IndexError, "index 9 is out of bounds"):
_ = ba.slice_bits(9)

def test_slice_shots(self):
Expand Down

0 comments on commit c2b0039

Please sign in to comment.