From 2b58eece509c22a692f4de2512ec41c00e1d2728 Mon Sep 17 00:00:00 2001 From: Vincent Deffontaines Date: Tue, 18 Mar 2025 22:11:27 +0100 Subject: Add webp support --- tests/test_libmat2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_libmat2.py') diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 1925201..332a5a3 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py @@ -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, -- cgit v1.3