| Revision 443,
1.2 KB
checked in by thomas, 2 years ago
(diff) |
- morituri/test/test_program_cdparanoia.py:
Update expected quality percentage.
Was broken since its commit in [432].
|
| Line | |
|---|
| 1 | # -*- Mode: Python; test-case-name: morituri.test.test_program_cdparanoia -*- |
|---|
| 2 | # vi:si:et:sw=4:sts=4:ts=4 |
|---|
| 3 | |
|---|
| 4 | import os |
|---|
| 5 | import unittest |
|---|
| 6 | |
|---|
| 7 | from morituri.program import cdparanoia |
|---|
| 8 | |
|---|
| 9 | class ParseTestCase(unittest.TestCase): |
|---|
| 10 | |
|---|
| 11 | def setUp(self): |
|---|
| 12 | # report from Afghan Whigs - Sweet Son Of A Bitch |
|---|
| 13 | path = os.path.join(os.path.dirname(__file__), |
|---|
| 14 | 'cdparanoia.progress') |
|---|
| 15 | self._parser = cdparanoia.ProgressParser(start=45990, stop=47719) |
|---|
| 16 | |
|---|
| 17 | self._handle = open(path) |
|---|
| 18 | |
|---|
| 19 | def testParse(self): |
|---|
| 20 | for line in self._handle.readlines(): |
|---|
| 21 | self._parser.parse(line) |
|---|
| 22 | |
|---|
| 23 | q = '%.01f %%' % (self._parser.getTrackQuality() * 100.0, ) |
|---|
| 24 | self.assertEquals(q, '99.7 %') |
|---|
| 25 | |
|---|
| 26 | class ErrorTestCase(unittest.TestCase): |
|---|
| 27 | |
|---|
| 28 | def setUp(self): |
|---|
| 29 | # report from a rip with offset -1164 causing scsi errors |
|---|
| 30 | path = os.path.join(os.path.dirname(__file__), |
|---|
| 31 | 'cdparanoia.progress.error') |
|---|
| 32 | self._parser = cdparanoia.ProgressParser(start=0, stop=10800) |
|---|
| 33 | |
|---|
| 34 | self._handle = open(path) |
|---|
| 35 | |
|---|
| 36 | def testParse(self): |
|---|
| 37 | for line in self._handle.readlines(): |
|---|
| 38 | self._parser.parse(line) |
|---|
| 39 | |
|---|
| 40 | q = '%.01f %%' % (self._parser.getTrackQuality() * 100.0, ) |
|---|
| 41 | self.assertEquals(q, '79.6 %') |
|---|
| 42 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.