From e81ce6cd1aadc382b37a428d3e030fc33f4464c5 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 10 Jun 2018 00:28:43 +0200 Subject: Fix and add a test for explicitly non-supported formats --- tests/test_libmat2.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test_libmat2.py') 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): self.assertEqual(parser, None) os.remove('./tests/clean.py') +class TestExplicitelyUnsupportedFiles(unittest.TestCase): + def test_pdf(self): + shutil.copy('./tests/test_libmat2.py', './tests/clean.txt') + parser, mimetype = parser_factory.get_parser('./tests/data/clean.txt') + self.assertEqual(mimetype, 'text/plain') + self.assertEqual(parser, None) + os.remove('./tests/clean.txt') + class TestCorruptedFiles(unittest.TestCase): def test_pdf(self): -- cgit v1.3