From 560f468855b155a2e2d23e84f08433b208f4594c Mon Sep 17 00:00:00 2001 From: Dennis van Gils <37263907+Dennis-van-Gils@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:44:31 +0100 Subject: [PATCH] Removed try-except to get 100% coverage --- tests/test_dvg_ringbuffer.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_dvg_ringbuffer.py b/tests/test_dvg_ringbuffer.py index 8d234b2..70d183b 100644 --- a/tests/test_dvg_ringbuffer.py +++ b/tests/test_dvg_ringbuffer.py @@ -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) @@ -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()