Files
whipper-gui/morituri/test/test_program_cdparanoia.py
Thomas Vander Stichele 8ef93523e4 * 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.
2009-06-06 11:16:41 +00:00

25 lines
710 B
Python

# -*- Mode: Python; test-case-name: morituri.test.test_program_cdparanoia -*-
# vi:si:et:sw=4:sts=4:ts=4
import os
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(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 %')