summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2018-09-24 20:15:07 +0200
committerjvoisin2018-09-24 20:15:07 +0200
commit719cdf20fa8c9921b81eaf6bf3df0d50c790de82 (patch)
tree2da79f90984aee0bdcd5036c0608d463cc1a07f4 /tests
parent2e243355f51654c8c6392c80a17b090f9f012fd1 (diff)
Second pass of minor formatting
Diffstat (limited to 'tests')
-rw-r--r--tests/test_corrupted_files.py6
-rw-r--r--tests/test_deep_cleaning.py2
-rw-r--r--tests/test_libmat2.py6
3 files changed, 5 insertions, 9 deletions
diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py
index aee1530..30039e6 100644
--- a/tests/test_corrupted_files.py
+++ b/tests/test_corrupted_files.py
@@ -146,19 +146,19 @@ class TestCorruptedFiles(unittest.TestCase):
146 def test_docx(self): 146 def test_docx(self):
147 shutil.copy('./tests/data/dirty.png', './tests/data/clean.docx') 147 shutil.copy('./tests/data/dirty.png', './tests/data/clean.docx')
148 with self.assertRaises(ValueError): 148 with self.assertRaises(ValueError):
149 office.MSOfficeParser('./tests/data/clean.docx') 149 office.MSOfficeParser('./tests/data/clean.docx')
150 os.remove('./tests/data/clean.docx') 150 os.remove('./tests/data/clean.docx')
151 151
152 def test_flac(self): 152 def test_flac(self):
153 shutil.copy('./tests/data/dirty.png', './tests/data/clean.flac') 153 shutil.copy('./tests/data/dirty.png', './tests/data/clean.flac')
154 with self.assertRaises(ValueError): 154 with self.assertRaises(ValueError):
155 audio.FLACParser('./tests/data/clean.flac') 155 audio.FLACParser('./tests/data/clean.flac')
156 os.remove('./tests/data/clean.flac') 156 os.remove('./tests/data/clean.flac')
157 157
158 def test_mp3(self): 158 def test_mp3(self):
159 shutil.copy('./tests/data/dirty.png', './tests/data/clean.mp3') 159 shutil.copy('./tests/data/dirty.png', './tests/data/clean.mp3')
160 with self.assertRaises(ValueError): 160 with self.assertRaises(ValueError):
161 audio.MP3Parser('./tests/data/clean.mp3') 161 audio.MP3Parser('./tests/data/clean.mp3')
162 os.remove('./tests/data/clean.mp3') 162 os.remove('./tests/data/clean.mp3')
163 163
164 def test_jpg(self): 164 def test_jpg(self):
diff --git a/tests/test_deep_cleaning.py b/tests/test_deep_cleaning.py
index 4f1920d..03db6c5 100644
--- a/tests/test_deep_cleaning.py
+++ b/tests/test_deep_cleaning.py
@@ -30,7 +30,6 @@ class TestZipMetadata(unittest.TestCase):
30 self.assertEqual(item.date_time, (1980, 1, 1, 0, 0, 0)) 30 self.assertEqual(item.date_time, (1980, 1, 1, 0, 0, 0))
31 self.assertEqual(item.create_system, 3) # 3 is UNIX 31 self.assertEqual(item.create_system, 3) # 3 is UNIX
32 32
33
34 def test_office(self): 33 def test_office(self):
35 shutil.copy('./tests/data/dirty.docx', './tests/data/clean.docx') 34 shutil.copy('./tests/data/dirty.docx', './tests/data/clean.docx')
36 p = office.MSOfficeParser('./tests/data/clean.docx') 35 p = office.MSOfficeParser('./tests/data/clean.docx')
@@ -50,7 +49,6 @@ class TestZipMetadata(unittest.TestCase):
50 os.remove('./tests/data/clean.docx') 49 os.remove('./tests/data/clean.docx')
51 os.remove('./tests/data/clean.cleaned.docx') 50 os.remove('./tests/data/clean.cleaned.docx')
52 51
53
54 def test_libreoffice(self): 52 def test_libreoffice(self):
55 shutil.copy('./tests/data/dirty.odt', './tests/data/clean.odt') 53 shutil.copy('./tests/data/dirty.odt', './tests/data/clean.odt')
56 p = office.LibreOfficeParser('./tests/data/clean.odt') 54 p = office.LibreOfficeParser('./tests/data/clean.odt')
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 7a1a9e7..cf13e03 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -55,8 +55,8 @@ class TestGetMeta(unittest.TestCase):
55 self.assertEqual(meta['producer'], 'pdfTeX-1.40.14') 55 self.assertEqual(meta['producer'], 'pdfTeX-1.40.14')
56 self.assertEqual(meta['creator'], "'Certified by IEEE PDFeXpress at 03/19/2016 2:56:07 AM'") 56 self.assertEqual(meta['creator'], "'Certified by IEEE PDFeXpress at 03/19/2016 2:56:07 AM'")
57 self.assertEqual(meta['DocumentID'], "uuid:4a1a79c8-404e-4d38-9580-5bc081036e61") 57 self.assertEqual(meta['DocumentID'], "uuid:4a1a79c8-404e-4d38-9580-5bc081036e61")
58 self.assertEqual(meta['PTEX.Fullbanner'], "This is pdfTeX, Version " \ 58 self.assertEqual(meta['PTEX.Fullbanner'], "This is pdfTeX, Version "
59 "3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea " \ 59 "3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea "
60 "version 6.1.1") 60 "version 6.1.1")
61 61
62 def test_torrent(self): 62 def test_torrent(self):
@@ -329,7 +329,6 @@ class TestCleaning(unittest.TestCase):
329 os.remove('./tests/data/clean.docx') 329 os.remove('./tests/data/clean.docx')
330 os.remove('./tests/data/clean.cleaned.docx') 330 os.remove('./tests/data/clean.cleaned.docx')
331 331
332
333 def test_libreoffice(self): 332 def test_libreoffice(self):
334 shutil.copy('./tests/data/dirty.odt', './tests/data/clean.odt') 333 shutil.copy('./tests/data/dirty.odt', './tests/data/clean.odt')
335 p = office.LibreOfficeParser('./tests/data/clean.odt') 334 p = office.LibreOfficeParser('./tests/data/clean.odt')
@@ -410,7 +409,6 @@ class TestCleaning(unittest.TestCase):
410 os.remove('./tests/data/clean.odf') 409 os.remove('./tests/data/clean.odf')
411 os.remove('./tests/data/clean.cleaned.odf') 410 os.remove('./tests/data/clean.cleaned.odf')
412 411
413
414 def test_odg(self): 412 def test_odg(self):
415 shutil.copy('./tests/data/dirty.odg', './tests/data/clean.odg') 413 shutil.copy('./tests/data/dirty.odg', './tests/data/clean.odg')
416 p = office.LibreOfficeParser('./tests/data/clean.odg') 414 p = office.LibreOfficeParser('./tests/data/clean.odg')