1
0
Fork 0
mirror of synced 2025-07-03 03:47:20 +02:00

Fix and add a test for explicitly non-supported formats

This commit is contained in:
jvoisin 2018-06-10 00:28:43 +02:00
parent 633654376a
commit e81ce6cd1a
2 changed files with 26 additions and 3 deletions

View file

@ -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):