pep8 fixes
This commit is contained in:
@@ -21,7 +21,7 @@ class EmptyTestCase(tcommon.TestCase):
|
||||
# this test makes sure that checksumming empty files doesn't hang
|
||||
self.runner = task.SyncRunner(verbose=False)
|
||||
fd, path = tempfile.mkstemp(suffix=u'morituri.test.empty')
|
||||
checksumtask = checksum.ChecksumTask(path)
|
||||
checksumtask = checksum.ChecksumTask(path)
|
||||
# FIXME: do we want a specific error for this ?
|
||||
e = self.assertRaises(task.TaskException, self.runner.run,
|
||||
checksumtask, verbose=False)
|
||||
@@ -32,7 +32,7 @@ class PathTestCase(tcommon.TestCase):
|
||||
def _testSuffix(self, suffix):
|
||||
self.runner = task.SyncRunner(verbose=False)
|
||||
fd, path = tempfile.mkstemp(suffix=suffix)
|
||||
checksumtask = checksum.ChecksumTask(path)
|
||||
checksumtask = checksum.ChecksumTask(path)
|
||||
e = self.assertRaises(task.TaskException, self.runner.run,
|
||||
checksumtask, verbose=False)
|
||||
self.failUnless(isinstance(e.exception, gstreamer.GstException))
|
||||
|
||||
@@ -9,7 +9,7 @@ gobject.threads_init()
|
||||
|
||||
import gst
|
||||
|
||||
from morituri.common import encode, log
|
||||
from morituri.common import encode
|
||||
|
||||
from morituri.extern.task import task, gstreamer
|
||||
|
||||
@@ -60,7 +60,7 @@ class TagReadTestCase(common.TestCase):
|
||||
class TagWriteTestCase(common.TestCase):
|
||||
def testWrite(self):
|
||||
fd, inpath = tempfile.mkstemp(suffix=u'.morituri.tagwrite.flac')
|
||||
|
||||
|
||||
# wave is pink-noise because a pure sine is encoded too efficiently
|
||||
# by flacenc and triggers not enough frames in parsing
|
||||
# FIXME: file a bug for this in GStreamer
|
||||
@@ -91,11 +91,11 @@ class TagWriteTestCase(common.TestCase):
|
||||
|
||||
os.unlink(inpath)
|
||||
os.unlink(outpath)
|
||||
|
||||
|
||||
class SafeRetagTestCase(common.TestCase):
|
||||
def setUp(self):
|
||||
self._fd, self._path = tempfile.mkstemp(suffix=u'.morituri.retag.flac')
|
||||
|
||||
|
||||
os.system('gst-launch '
|
||||
'audiotestsrc '
|
||||
'num-buffers=40 samplesperbuffer=588 wave=pink-noise ! '
|
||||
|
||||
@@ -10,6 +10,7 @@ from morituri.result import result
|
||||
from morituri.common import program, accurip, musicbrainzngs
|
||||
from morituri.rip import cd
|
||||
|
||||
|
||||
class TrackImageVerifyTestCase(unittest.TestCase):
|
||||
# example taken from a rip of Luke Haines Is Dead, disc 1
|
||||
# AccurateRip database has 0 confidence for 1st track
|
||||
@@ -71,7 +72,7 @@ class HTOATestCase(unittest.TestCase):
|
||||
path = os.path.join(os.path.dirname(__file__),
|
||||
'silentalarm.result.pickle')
|
||||
self._tracks = pickle.load(open(path, 'rb'))
|
||||
|
||||
|
||||
def testGetAccurateRipResults(self):
|
||||
prog = program.Program()
|
||||
prog.result = result.RipResult()
|
||||
@@ -87,7 +88,7 @@ class PathTestCase(unittest.TestCase):
|
||||
path = prog.getPath(u'/tmp', cd.DEFAULT_DISC_TEMPLATE, 'mbdiscid', 0)
|
||||
self.assertEquals(path,
|
||||
u'/tmp/Unknown Artist - mbdiscid/Unknown Artist - mbdiscid')
|
||||
|
||||
|
||||
def testStandardTemplateFilled(self):
|
||||
prog = program.Program()
|
||||
md = musicbrainzngs.DiscMetadata()
|
||||
|
||||
Reference in New Issue
Block a user