summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2018-05-16 22:10:47 +0200
committerjvoisin2018-05-16 22:10:47 +0200
commit0354c3b7e3a455cce130b6226926436a21128641 (patch)
treedd85bb61c96457efa723394de2065af349750fa1 /tests
parenteffe68f08f19ff26c37ede5a7a92d5d4452434fe (diff)
Add a test about unsupported files
Diffstat (limited to 'tests')
-rw-r--r--tests/test_libmat2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 17afaf4..f3e11d9 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -16,6 +16,16 @@ class TestParserFactory(unittest.TestCase):
16 self.assertEqual(mimetype, 'audio/mpeg') 16 self.assertEqual(mimetype, 'audio/mpeg')
17 self.assertEqual(parser.__class__, audio.MP3Parser) 17 self.assertEqual(parser.__class__, audio.MP3Parser)
18 18
19
20class TestUnsupportedFiles(unittest.TestCase):
21 def test_pdf(self):
22 shutil.copy('./tests/test_libmat2.py', './tests/clean.py')
23 parser, mimetype = parser_factory.get_parser('./tests/data/clean.py')
24 self.assertEqual(mimetype, 'text/x-python')
25 self.assertEqual(parser, None)
26 os.remove('./tests/clean.py')
27
28
19class TestCorruptedFiles(unittest.TestCase): 29class TestCorruptedFiles(unittest.TestCase):
20 def test_pdf(self): 30 def test_pdf(self):
21 shutil.copy('./tests/data/dirty.png', './tests/data/clean.png') 31 shutil.copy('./tests/data/dirty.png', './tests/data/clean.png')