* morituri/test/test_common_program.py:

* morituri/common/program.py:
	  Extract a common method to get textual representation of
	  AccurateRip results, and test it.
	* morituri/rip/cd.py:
	* morituri/rip/image.py:
	  Use the method.
This commit is contained in:
Thomas Vander Stichele
2009-06-24 20:47:44 +00:00
parent 5d002d9126
commit 1e063f08a7
5 changed files with 63 additions and 27 deletions

View File

@@ -51,3 +51,14 @@ class TrackImageVerifyTestCase(unittest.TestCase):
self.assertEquals(tr.ARDBMaxConfidence, 2)
# we know track 10 was ripped wrong
self.assertNotEquals(tr.ARDBCRC, checksums[10 - 1])
res = prog.getAccurateRipResults()
self.assertEquals(res[1 - 1],
"Track 1: rip NOT accurate (not found) "
"[620b0797], DB [notfound]")
self.assertEquals(res[2 - 1],
"Track 2: rip accurate (max confidence 2) "
"[af8c44c5], DB [af8c44c5]")
self.assertEquals(res[10 - 1],
"Track 10: rip NOT accurate (max confidence 2) "
"[16457a5a], DB [eb6e55b4]")