Improved handling for paths and added tests for it
This commit is contained in:
parent
cefc5c99d9
commit
ff8969efb9
4 changed files with 15 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from pprint import pprint as pp
|
||||
#from pprint import pprint as pp
|
||||
|
||||
from media.metadata.process import global_reader
|
||||
from media.monitor.metadata import Metadata
|
||||
|
@ -9,6 +9,13 @@ import media.metadata.definitions as defs
|
|||
defs.load_definitions()
|
||||
|
||||
class TestMMP(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.maxDiff = None
|
||||
|
||||
def metadatas(self,f):
|
||||
return global_reader.read_mutagen(f), Metadata(f).extract()
|
||||
|
||||
def test_old_metadata(self):
|
||||
path = "/home/rudi/music/Nightingale.mp3"
|
||||
m = global_reader.read_mutagen(path)
|
||||
|
@ -18,8 +25,8 @@ class TestMMP(unittest.TestCase):
|
|||
|
||||
def test_recorded(self):
|
||||
recorded_file = "./15:15:00-Untitled Show-256kbps.ogg"
|
||||
m = global_reader.read_mutagen(recorded_file)
|
||||
pp(m)
|
||||
emf, old = self.metadatas(recorded_file)
|
||||
self.assertEqual(emf, old)
|
||||
|
||||
|
||||
if __name__ == '__main__': unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue