From 85c08c5b68301d655a88dd78f2a5e790009a5eb6 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 24 Apr 2021 17:26:38 +0200 Subject: Add support for AIFF files This should close #151 --- tests/data/dirty.aiff | Bin 0 -> 358824 bytes tests/test_libmat2.py | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/data/dirty.aiff (limited to 'tests') diff --git a/tests/data/dirty.aiff b/tests/data/dirty.aiff new file mode 100644 index 0000000..03aab43 Binary files /dev/null and b/tests/data/dirty.aiff differ diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index a6c3a9a..5b9ad59 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py @@ -230,6 +230,11 @@ class TestGetMeta(unittest.TestCase): p = images.SVGParser('./tests/data/weird.svg') self.assertEqual(p.get_meta()['Xmlns'], 'http://www.w3.org/1337/svg') + def test_aiff(self): + p = audio.AIFFParser('./tests/data/dirty.aiff') + meta = p.get_meta() + self.assertEqual(meta['Name'], 'I am so') + class TestRemovingThumbnails(unittest.TestCase): def test_odt(self): @@ -312,6 +317,12 @@ class TestCleaning(unittest.TestCase): 'meta': {'Comment': 'Zomg, a comment!'}, 'expected_meta': {}, }, { + 'name': 'aiff', + 'parser': audio.AIFFParser, + 'meta': {'Annotation': 'Thank you for using MAT !'}, + 'expected_meta': {}, + }, + { 'name': 'mp3', 'parser': audio.MP3Parser, 'meta': {'TXXX:I am a': 'various comment'}, -- cgit v1.3