summaryrefslogtreecommitdiff
path: root/tests/test_libmat2.py
diff options
context:
space:
mode:
authorjvoisin2020-01-01 17:34:42 +0100
committerjvoisin2020-01-01 19:47:46 +0100
commitee704db2ffa416c14965ba4bdba7d0842ca2e285 (patch)
tree1cef747315e6160043d080e5fd8bcab6fc586244 /tests/test_libmat2.py
parent693408f1a6ec6b41c9c60548a06b21af1e302647 (diff)
Add support for wav files
Diffstat (limited to 'tests/test_libmat2.py')
-rw-r--r--tests/test_libmat2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 20e6a01..9d29094 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -127,6 +127,11 @@ class TestGetMeta(unittest.TestCase):
127 self.assertEqual(meta['Model'], 'C7070WZ') 127 self.assertEqual(meta['Model'], 'C7070WZ')
128 self.assertEqual(meta['ModifyDate'], '2005:12:26 17:09:35') 128 self.assertEqual(meta['ModifyDate'], '2005:12:26 17:09:35')
129 129
130 def test_wav(self):
131 p = audio.WAVParser('./tests/data/dirty.wav')
132 meta = p.get_meta()
133 self.assertEqual(meta['Artist'], 'jvoisin')
134
130 def test_mp3(self): 135 def test_mp3(self):
131 p = audio.MP3Parser('./tests/data/dirty.mp3') 136 p = audio.MP3Parser('./tests/data/dirty.mp3')
132 meta = p.get_meta() 137 meta = p.get_meta()
@@ -302,6 +307,11 @@ class TestCleaning(unittest.TestCase):
302 'meta': {'Comment': 'Created with GIMP'}, 307 'meta': {'Comment': 'Created with GIMP'},
303 'expected_meta': {}, 308 'expected_meta': {},
304 }, { 309 }, {
310 'name': 'wav',
311 'parser': audio.WAVParser,
312 'meta': {'Comment': 'Zomg, a comment!'},
313 'expected_meta': {},
314 }, {
305 'name': 'mp3', 315 'name': 'mp3',
306 'parser': audio.MP3Parser, 316 'parser': audio.MP3Parser,
307 'meta': {'TXXX:I am a': 'various comment'}, 317 'meta': {'TXXX:I am a': 'various comment'},