1
0
Fork 0
mirror of synced 2025-07-03 20:07:28 +02:00

Split the testsuite a bit and add more tests

This commit is contained in:
jvoisin 2018-06-22 21:16:55 +02:00
parent b4ef0c9622
commit 74f2d50433
3 changed files with 99 additions and 66 deletions

View file

@ -6,6 +6,17 @@ from . import abstract
class MutagenParser(abstract.AbstractParser):
def __init__(self, filename):
super().__init__(filename)
try:
mutagen.File(self.filename)
except mutagen.flac.MutagenError:
raise ValueError
except mutagen.mp3.MutagenError:
raise ValueError
except mutagen.ogg.MutagenError:
raise ValueError
def get_meta(self):
f = mutagen.File(self.filename)
if f.tags: