Skip to content

Commit

Permalink
Removed try-except to get 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis-van-Gils committed Feb 27, 2023
1 parent 6dee87c commit 560f468
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_dvg_ringbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ def test_degenerate(self):
np.testing.assert_equal(r, np.array([]))

# this does not error with deque(maxlen=0), so should not error here
try:
r.append(0)
r.appendleft(0)
r.extend([0])
r.extendleft([0])
except IndexError:
self.fail()
# try:
r.append(0)
r.appendleft(0)
r.extend([0])
r.extendleft([0])
# except IndexError:
# self.fail()

def test_addresses(self):
r = RingBuffer(5)
Expand Down Expand Up @@ -247,8 +247,8 @@ def test_errors(self):
r[2]


if not hasattr(TestAll, "assertRaisesRegex"):
TestAll.assertRaisesRegex = TestAll.assertRaisesRegexp
# if not hasattr(TestAll, "assertRaisesRegex"):
# TestAll.assertRaisesRegex = TestAll.assertRaisesRegexp

if __name__ == "__main__":
unittest.main()

0 comments on commit 560f468

Please sign in to comment.