diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_corrupted_files.py | 9 |
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): |
