* morituri/test/cdparanoia.progress:
Add a shorter test file, 23 seconds. * morituri/test/test_program_cdparanoia.py: Update the test to adapt. Check for track quality. * morituri/program/cdparanoia.py: Add a measure of track quality based on the number of reads. Use the [wrote] output for progress updates, a bit more jittery in its output. * morituri/rip/cd.py: Set track quality on RipResult.
This commit is contained in:
@@ -7,13 +7,18 @@ import unittest
|
||||
from morituri.program import cdparanoia
|
||||
|
||||
class ParseTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
# report from Afghan Whigs - Sweet Son Of A Bitch
|
||||
path = os.path.join(os.path.dirname(__file__),
|
||||
'cdparanoia.progress')
|
||||
self._parser = cdparanoia.ProgressParser()
|
||||
self._parser = cdparanoia.ProgressParser(start=45990, stop=47719)
|
||||
|
||||
self._handle = open(path)
|
||||
|
||||
def testParse(self):
|
||||
for line in self._handle.readlines():
|
||||
self._parser.parse(line)
|
||||
|
||||
q = '%.01f %%' % (self._parser.getTrackQuality() * 100.0, )
|
||||
self.assertEquals(q, '99.7 %')
|
||||
|
||||
Reference in New Issue
Block a user