diff options
| author | jvoisin | 2018-04-16 22:27:29 +0200 |
|---|---|---|
| committer | jvoisin | 2018-04-16 22:27:29 +0200 |
| commit | e34bc19f7126b80764a4c8747a7a2a1636289396 (patch) | |
| tree | 577ce5fc2de9c82f50bc70030b9ad30265b0622e /tests/test_libmat2.py | |
| parent | 4b92bef2193bb02e914eb7aedc04f22468248f9c (diff) | |
Add support for BMP
To be completely honest, BMP have no metadata,
but we still add it, just in caseā¢
Diffstat (limited to 'tests/test_libmat2.py')
| -rw-r--r-- | tests/test_libmat2.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 34f7301..ae04dc2 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -307,3 +307,18 @@ class TestCleaning(unittest.TestCase): | |||
| 307 | self.assertEqual(p.get_meta(), {}) | 307 | self.assertEqual(p.get_meta(), {}) |
| 308 | 308 | ||
| 309 | os.remove('./tests/data/clean.tiff') | 309 | os.remove('./tests/data/clean.tiff') |
| 310 | |||
| 311 | def test_bmp(self): | ||
| 312 | shutil.copy('./tests/data/dirty.bmp', './tests/data/clean.bmp') | ||
| 313 | p = images.BMPParser('./tests/data/clean.bmp') | ||
| 314 | |||
| 315 | meta = p.get_meta() | ||
| 316 | self.assertEqual(meta, {}) # bmp has no meta :) | ||
| 317 | |||
| 318 | ret = p.remove_all() | ||
| 319 | self.assertTrue(ret) | ||
| 320 | |||
| 321 | p = images.BMPParser('./tests/data/clean.bmp.cleaned') | ||
| 322 | self.assertEqual(p.get_meta(), {}) | ||
| 323 | |||
| 324 | os.remove('./tests/data/clean.bmp') | ||
