diff options
| author | jvoisin | 2022-05-15 18:57:27 +0200 |
|---|---|---|
| committer | jvoisin | 2022-05-15 18:57:27 +0200 |
| commit | 704367f91eebe6158399f930f725334db96de134 (patch) | |
| tree | 2a2f77e6e0b241b1120915df3608d961320072e7 /tests | |
| parent | 263971370931b1c5b8c49ab287e6d30e40d974e2 (diff) | |
Add support for HEIC files
Thanks to Maxime Morin ( https://www.maijin.fr/ )
for the patch.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/data/dirty.heic | bin | 0 -> 1322449 bytes | |||
| -rw-r--r-- | tests/test_libmat2.py | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/data/dirty.heic b/tests/data/dirty.heic new file mode 100644 index 0000000..0dc531d --- /dev/null +++ b/tests/data/dirty.heic | |||
| Binary files differ | |||
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 9e56969..b32005f 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -251,6 +251,12 @@ class TestGetMeta(unittest.TestCase): | |||
| 251 | meta = p.get_meta() | 251 | meta = p.get_meta() |
| 252 | self.assertEqual(meta['Name'], 'I am so') | 252 | self.assertEqual(meta['Name'], 'I am so') |
| 253 | 253 | ||
| 254 | def test_heic(self): | ||
| 255 | p = images.HEICParser('./tests/data/dirty.heic') | ||
| 256 | meta = p.get_meta() | ||
| 257 | self.assertEqual(meta['ProfileCopyright'], 'Public Domain') | ||
| 258 | self.assertEqual(meta['ProfileDescription'], 'GIMP built-in sRGB') | ||
| 259 | |||
| 254 | 260 | ||
| 255 | class TestRemovingThumbnails(unittest.TestCase): | 261 | class TestRemovingThumbnails(unittest.TestCase): |
| 256 | def test_odt(self): | 262 | def test_odt(self): |
| @@ -504,6 +510,11 @@ class TestCleaning(unittest.TestCase): | |||
| 504 | 'EncodingSettings': 'Lavf52.103.0', | 510 | 'EncodingSettings': 'Lavf52.103.0', |
| 505 | }, | 511 | }, |
| 506 | 'expected_meta': {}, | 512 | 'expected_meta': {}, |
| 513 | },{ | ||
| 514 | 'name': 'heic', | ||
| 515 | 'parser': images.HEICParser, | ||
| 516 | 'meta': {}, | ||
| 517 | 'expected_meta': {}, | ||
| 507 | } | 518 | } |
| 508 | ] | 519 | ] |
| 509 | 520 | ||
