summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2018-06-10 00:28:43 +0200
committerjvoisin2018-06-10 00:28:43 +0200
commite81ce6cd1aadc382b37a428d3e030fc33f4464c5 (patch)
tree2f6168a4a641695e0b61b66a6a30e95b2c625ee6 /tests
parent633654376ab3821b7b65f4bb44fc00bcc1e9e8fb (diff)
Fix and add a test for explicitly non-supported formats
Diffstat (limited to 'tests')
-rw-r--r--tests/test_libmat2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 84eb75e..3d08dea 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -35,6 +35,14 @@ class TestUnsupportedFiles(unittest.TestCase):
35 self.assertEqual(parser, None) 35 self.assertEqual(parser, None)
36 os.remove('./tests/clean.py') 36 os.remove('./tests/clean.py')
37 37
38class TestExplicitelyUnsupportedFiles(unittest.TestCase):
39 def test_pdf(self):
40 shutil.copy('./tests/test_libmat2.py', './tests/clean.txt')
41 parser, mimetype = parser_factory.get_parser('./tests/data/clean.txt')
42 self.assertEqual(mimetype, 'text/plain')
43 self.assertEqual(parser, None)
44 os.remove('./tests/clean.txt')
45
38 46
39class TestCorruptedFiles(unittest.TestCase): 47class TestCorruptedFiles(unittest.TestCase):
40 def test_pdf(self): 48 def test_pdf(self):