Skip to content

Commit b361221

Browse files
committed
Fix pylint warnings
1 parent 5e120fd commit b361221

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

tests/test_bitmap_c_interface.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,8 @@ def test_non_zero(self):
6565

6666
def test_throws_x_out_of_range(self):
6767
b = Bitmap_C_Interface(2, 4, 1)
68-
try:
68+
with self.assertRaises(ValueError):
6969
b[2, 1] = 100
70-
self.fail("should have thrown")
71-
except ValueError:
72-
pass
7370

7471
def test_max(self):
7572
b = Bitmap_C_Interface(2, 4, 1)
@@ -78,18 +75,13 @@ def test_max(self):
7875

7976
def test_uninitialized(self):
8077
b = Bitmap_C_Interface(2, 4, 1)
81-
try:
78+
with self.assertRaises(RuntimeError):
8279
b[1, 1]
83-
self.fail("should have thrown")
84-
except RuntimeError:
85-
pass
8680

87-
def test_validate_throws(self):
81+
def test_validate_throws():
8882
b = Bitmap_C_Interface(2, 4, 1)
89-
try:
83+
with self.assertRaises(ValueError):
9084
b.validate()
91-
except ValueError:
92-
pass
9385

9486
def test_repr(self):
9587
b = Bitmap_C_Interface(3, 2, 1)

0 commit comments

Comments
 (0)