Browse Source

python: test also named AbstractImporter APIs with no file opened.

Code coverage says red!
next
Vladimír Vondruš 3 years ago
parent
commit
47226d22f6
  1. 8
      src/python/magnum/test/test_trade.py

8
src/python/magnum/test/test_trade.py

@ -605,6 +605,8 @@ class Importer(unittest.TestCase):
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.mesh(0)
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.mesh('')
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image1d_count
@ -636,10 +638,16 @@ class Importer(unittest.TestCase):
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image1d(0)
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image1d('')
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image2d(0)
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image2d('')
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image3d(0)
with self.assertRaisesRegex(AssertionError, "no file opened"):
importer.image3d('')
def test_index_oob(self):
importer = trade.ImporterManager().load_and_instantiate('StbImageImporter')

Loading…
Cancel
Save