Skip to content

Commit 051abe9

Browse files
committed
tests: add superclass for ImageSlide tests
Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 13aaeb8 commit 051abe9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_imageslide.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ def test_context_manager(self):
6262
)
6363

6464

65-
class TestImage(unittest.TestCase):
65+
class _SlideTest:
6666
def setUp(self):
67-
self.osr = ImageSlide(file_path('boxes.png'))
67+
self.osr = ImageSlide(file_path(self.FILENAME))
6868

6969
def tearDown(self):
7070
self.osr.close()
7171

72+
73+
class TestImage(_SlideTest, unittest.TestCase):
74+
FILENAME = 'boxes.png'
75+
7276
def test_repr(self):
7377
self.assertEqual(repr(self.osr), 'ImageSlide(%r)' % file_path('boxes.png'))
7478

0 commit comments

Comments
 (0)