From 7465cedee790439aff799a68e5071ed96c772b61 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 16 Dec 2019 14:55:35 -0800 Subject: Handle tiff images with a .tif extension --- tests/test_corrupted_files.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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): audio.MP3Parser('./tests/data/clean.mp3') os.remove('./tests/data/clean.mp3') + def test_wrong_tif(self): + shutil.copy('./tests/data/dirty.tiff', './tests/data/clean.tif') + p = images.TiffParser('./tests/data/clean.tif') + p.remove_all() + p = images.TiffParser('./tests/data/clean.cleaned.tif') + self.assertEqual(p.get_meta(), {}) + os.remove('./tests/data/clean.tif') + os.remove('./tests/data/clean.cleaned.tif') + def test_jpg(self): shutil.copy('./tests/data/dirty.mp3', './tests/data/clean.jpg') with self.assertRaises(ValueError): -- cgit v1.3