[SCM] morituri/master: use more diffstrings; use it from reference to generated
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:10:13 UTC 2014
The following commit has been merged in the master branch:
commit 19fa97e23aeb0343fe9fb8481f1428d0553fa11f
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sat Aug 24 13:57:56 2013 +0200
use more diffstrings; use it from reference to generated
diff --git a/morituri/test/test_image_cue.py b/morituri/test/test_image_cue.py
index b6e2909..5abfcd7 100644
--- a/morituri/test/test_image_cue.py
+++ b/morituri/test/test_image_cue.py
@@ -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)
diff --git a/morituri/test/test_image_toc.py b/morituri/test/test_image_toc.py
index 49d56b8..998bc0a 100644
--- a/morituri/test/test_image_toc.py
+++ b/morituri/test/test_image_toc.py
@@ -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
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list