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