summaryrefslogtreecommitdiff
path: root/tests/test_libmat2.py
diff options
context:
space:
mode:
authorjvoisin2018-04-03 23:29:34 +0200
committerjvoisin2018-04-03 23:29:34 +0200
commitccf16d748992b3e7061d1876c46f9a5ce9641907 (patch)
treeabd7e295f45bc306ae26ab0f41193bcf30295f5c /tests/test_libmat2.py
parentcd8f1a55b1b48dea9a277a4cfa6b1ad56440b5ea (diff)
Add a test for an issue highligthed by 76f25212d1eef99c360b0a50cd5b88c117acf278
Diffstat (limited to 'tests/test_libmat2.py')
-rw-r--r--tests/test_libmat2.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index b52e8ce..34eea49 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -8,6 +8,13 @@ import tempfile
8 8
9from src import pdf, images, audio, office, parser_factory 9from src import pdf, images, audio, office, parser_factory
10 10
11class TestParserFactory(unittest.TestCase):
12 def test_subsubcalss(self):
13 """ Test that our module auto-detection is handling sub-sub-classes """
14 parser, mimetype = parser_factory.get_parser('./tests/data/dirty.mp3')
15 self.assertEqual(mimetype, 'audio/mpeg')
16 self.assertEqual(parser.__class__, audio.MP3Parser)
17
11class TestGetMeta(unittest.TestCase): 18class TestGetMeta(unittest.TestCase):
12 def test_pdf(self): 19 def test_pdf(self):
13 p = pdf.PDFParser('./tests/data/dirty.pdf') 20 p = pdf.PDFParser('./tests/data/dirty.pdf')