summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_climat2.py1
-rw-r--r--tests/test_libmat2.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_climat2.py b/tests/test_climat2.py
index f395001..b9c52b5 100644
--- a/tests/test_climat2.py
+++ b/tests/test_climat2.py
@@ -13,6 +13,7 @@ class TestHelp(unittest.TestCase):
13 stdout, _ = proc.communicate() 13 stdout, _ = proc.communicate()
14 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout) 14 self.assertIn(b'usage: main.py [-h] [-c] [-l] [-s] [files [files ...]]', stdout)
15 15
16
16class TestGetMeta(unittest.TestCase): 17class TestGetMeta(unittest.TestCase):
17 def test_pdf(self): 18 def test_pdf(self):
18 proc = subprocess.Popen(['./main.py', '--show', './tests/data/dirty.pdf'], 19 proc = subprocess.Popen(['./main.py', '--show', './tests/data/dirty.pdf'],
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index c2864c6..4cfb80a 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -8,6 +8,7 @@ import tempfile
8 8
9from src import pdf, images, audio, office, parser_factory 9from src import pdf, images, audio, office, parser_factory
10 10
11
11class TestParserFactory(unittest.TestCase): 12class TestParserFactory(unittest.TestCase):
12 def test_subsubcalss(self): 13 def test_subsubcalss(self):
13 """ Test that our module auto-detection is handling sub-sub-classes """ 14 """ Test that our module auto-detection is handling sub-sub-classes """
@@ -15,6 +16,7 @@ class TestParserFactory(unittest.TestCase):
15 self.assertEqual(mimetype, 'audio/mpeg') 16 self.assertEqual(mimetype, 'audio/mpeg')
16 self.assertEqual(parser.__class__, audio.MP3Parser) 17 self.assertEqual(parser.__class__, audio.MP3Parser)
17 18
19
18class TestGetMeta(unittest.TestCase): 20class TestGetMeta(unittest.TestCase):
19 def test_pdf(self): 21 def test_pdf(self):
20 p = pdf.PDFParser('./tests/data/dirty.pdf') 22 p = pdf.PDFParser('./tests/data/dirty.pdf')
@@ -132,6 +134,7 @@ class TestDeepCleaning(unittest.TestCase):
132 134
133 os.remove('./tests/data/clean.odt') 135 os.remove('./tests/data/clean.odt')
134 136
137
135class TestCleaning(unittest.TestCase): 138class TestCleaning(unittest.TestCase):
136 def test_pdf(self): 139 def test_pdf(self):
137 shutil.copy('./tests/data/dirty.pdf', './tests/data/clean.pdf') 140 shutil.copy('./tests/data/dirty.pdf', './tests/data/clean.pdf')