summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2019-12-16 14:55:35 -0800
committerjvoisin2019-12-16 14:55:35 -0800
commit7465cedee790439aff799a68e5071ed96c772b61 (patch)
tree24e1fe7aa7d47af272c886eb819df9ead51f35b3 /tests
parentf5aef1b391e8c112543a6cebe50e8397b1daf3ca (diff)
Handle tiff images with a .tif extension
Diffstat (limited to 'tests')
-rw-r--r--tests/test_corrupted_files.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py
index 6dc80a4..d4b40a5 100644
--- a/tests/test_corrupted_files.py
+++ b/tests/test_corrupted_files.py
@@ -187,6 +187,15 @@ class TestCorruptedFiles(unittest.TestCase):
187 audio.MP3Parser('./tests/data/clean.mp3') 187 audio.MP3Parser('./tests/data/clean.mp3')
188 os.remove('./tests/data/clean.mp3') 188 os.remove('./tests/data/clean.mp3')
189 189
190 def test_wrong_tif(self):
191 shutil.copy('./tests/data/dirty.tiff', './tests/data/clean.tif')
192 p = images.TiffParser('./tests/data/clean.tif')
193 p.remove_all()
194 p = images.TiffParser('./tests/data/clean.cleaned.tif')
195 self.assertEqual(p.get_meta(), {})
196 os.remove('./tests/data/clean.tif')
197 os.remove('./tests/data/clean.cleaned.tif')
198
190 def test_jpg(self): 199 def test_jpg(self):
191 shutil.copy('./tests/data/dirty.mp3', './tests/data/clean.jpg') 200 shutil.copy('./tests/data/dirty.mp3', './tests/data/clean.jpg')
192 with self.assertRaises(ValueError): 201 with self.assertRaises(ValueError):