1
0
Fork 0
mirror of synced 2025-07-04 04:17:29 +02:00

Add webp support

This commit is contained in:
Vincent Deffontaines 2025-03-18 22:11:27 +01:00 committed by jvoisin
parent 29f404bce3
commit 2b58eece50
5 changed files with 32 additions and 0 deletions

View file

@ -113,6 +113,11 @@ class TestGetMeta(unittest.TestCase):
meta = p.get_meta()
self.assertEqual(meta['Comment'], 'Created with GIMP')
def test_webp(self):
p = images.WEBPParser('./tests/data/dirty.webp')
meta = p.get_meta()
self.assertEqual(meta['Warning'], '[minor] Improper EXIF header')
def test_ppm(self):
p = images.PPMParser('./tests/data/dirty.ppm')
meta = p.get_meta()
@ -333,6 +338,11 @@ class TestCleaning(unittest.TestCase):
'parser': images.JPGParser,
'meta': {'Comment': 'Created with GIMP'},
'expected_meta': {},
}, {
'name': 'webp',
'parser': images.WEBPParser,
'meta': {'Warning': '[minor] Improper EXIF header'},
'expected_meta': {},
}, {
'name': 'wav',
'parser': audio.WAVParser,