use more diffstrings; use it from reference to generated
This commit is contained in:
@@ -7,6 +7,8 @@ import unittest
|
||||
|
||||
from morituri.image import table, cue
|
||||
|
||||
from morituri.test import common
|
||||
|
||||
|
||||
class KingsSingleTestCase(unittest.TestCase):
|
||||
|
||||
@@ -73,7 +75,7 @@ class WriteCueFileTestCase(unittest.TestCase):
|
||||
it.absolutize()
|
||||
it.leadout = 3000
|
||||
|
||||
self.assertEquals(it.cue(), """REM DISCID 0C002802
|
||||
common.diffStrings(u"""REM DISCID 0C002802
|
||||
REM COMMENT "Morituri"
|
||||
FILE "track01.wav" WAVE
|
||||
TRACK 01 AUDIO
|
||||
@@ -82,5 +84,5 @@ FILE "track01.wav" WAVE
|
||||
INDEX 00 00:13:25
|
||||
FILE "track02.wav" WAVE
|
||||
INDEX 01 00:00:00
|
||||
""")
|
||||
""", it.cue())
|
||||
os.unlink(path)
|
||||
|
||||
@@ -90,7 +90,7 @@ class CureTestCase(common.TestCase):
|
||||
cue = self.toc.table.cue()
|
||||
ref = open(os.path.join(os.path.dirname(__file__), 'cure.cue')).read(
|
||||
).decode('utf-8')
|
||||
common.diffStrings(cue, ref)
|
||||
common.diffStrings(ref, cue)
|
||||
|
||||
# we verify it because it has failed in readdisc in the past
|
||||
self.assertEquals(self.toc.table.getAccurateRipURL(),
|
||||
@@ -160,8 +160,8 @@ class BlocTestCase(common.TestCase):
|
||||
self.failUnless(self.toc.table.hasTOC())
|
||||
cue = self.toc.table.cue()
|
||||
ref = open(os.path.join(os.path.dirname(__file__),
|
||||
'bloc.cue')).read()
|
||||
common.diffStrings(cue, ref)
|
||||
'bloc.cue')).read().decode('utf-8')
|
||||
common.diffStrings(ref, cue)
|
||||
|
||||
def testCDDBId(self):
|
||||
# self.toc.table.absolutize()
|
||||
@@ -371,8 +371,8 @@ class StrokesTestCase(common.TestCase):
|
||||
|
||||
cue = self._filterCue(self.toc.table.cue())
|
||||
ref = self._filterCue(open(os.path.join(os.path.dirname(__file__),
|
||||
'strokes-someday.eac.cue')).read())
|
||||
common.diffStrings(cue, ref)
|
||||
'strokes-someday.eac.cue')).read()).decode('utf-8')
|
||||
common.diffStrings(ref, cue)
|
||||
|
||||
def _filterCue(self, output):
|
||||
# helper to be able to compare our generated .cue with the
|
||||
|
||||
Reference in New Issue
Block a user