diff options
Diffstat (limited to 'tests/test_lightweigh_cleaning.py')
| -rw-r--r-- | tests/test_lightweigh_cleaning.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_lightweigh_cleaning.py b/tests/test_lightweigh_cleaning.py index 5fd7ad6..a115f05 100644 --- a/tests/test_lightweigh_cleaning.py +++ b/tests/test_lightweigh_cleaning.py | |||
| @@ -80,3 +80,27 @@ class TestLightWeightCleaning(unittest.TestCase): | |||
| 80 | 80 | ||
| 81 | os.remove('./tests/data/clean.torrent') | 81 | os.remove('./tests/data/clean.torrent') |
| 82 | os.remove('./tests/data/clean.cleaned.torrent') | 82 | os.remove('./tests/data/clean.cleaned.torrent') |
| 83 | |||
| 84 | def test_tiff(self): | ||
| 85 | shutil.copy('./tests/data/dirty.tiff', './tests/data/clean.tiff') | ||
| 86 | p = images.TiffParser('./tests/data/clean.tiff') | ||
| 87 | |||
| 88 | meta = p.get_meta() | ||
| 89 | self.assertEqual(meta['ImageDescription'], 'OLYMPUS DIGITAL CAMERA ') | ||
| 90 | |||
| 91 | p.lightweight_cleaning = True | ||
| 92 | ret = p.remove_all() | ||
| 93 | self.assertTrue(ret) | ||
| 94 | |||
| 95 | p = images.TiffParser('./tests/data/clean.cleaned.tiff') | ||
| 96 | self.assertEqual(p.get_meta(), | ||
| 97 | { | ||
| 98 | 'Orientation': 'Horizontal (normal)', | ||
| 99 | 'ResolutionUnit': 'inches', | ||
| 100 | 'XResolution': 72, | ||
| 101 | 'YResolution': 72 | ||
| 102 | } | ||
| 103 | ) | ||
| 104 | |||
| 105 | os.remove('./tests/data/clean.tiff') | ||
| 106 | os.remove('./tests/data/clean.cleaned.tiff') | ||
