[SCM] morituri/master: pep8 fixes
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:41 UTC 2014
The following commit has been merged in the master branch:
commit b9d680706527a6bc91ce8966cab1094f0b37b284
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sat Nov 10 22:24:50 2012 +0000
pep8 fixes
diff --git a/morituri/test/common.py b/morituri/test/common.py
index e28057f..aaa3cdc 100644
--- a/morituri/test/common.py
+++ b/morituri/test/common.py
@@ -57,6 +57,7 @@ class TestCase(unittest.TestCase):
assertRaises = failUnlessRaises
+
class UnicodeTestMixin:
# A helper mixin to skip tests if we're not in a UTF-8 locale
try:
@@ -65,4 +66,3 @@ class UnicodeTestMixin:
skip = 'No UTF-8 locale'
except OSError:
pass
-
diff --git a/morituri/test/test_common_drive.py b/morituri/test/test_common_drive.py
index cecbbcb..8e56be2 100644
--- a/morituri/test/test_common_drive.py
+++ b/morituri/test/test_common_drive.py
@@ -13,4 +13,3 @@ class ListifyTestCase(common.TestCase):
def testList(self):
lst = ['/dev/scd0', '/dev/sr0']
self.assertEquals(drive._listify(lst), lst)
-
diff --git a/morituri/test/test_image_image.py b/morituri/test/test_image_image.py
index aa7b08d..1b575a1 100644
--- a/morituri/test/test_image_image.py
+++ b/morituri/test/test_image_image.py
@@ -117,4 +117,3 @@ class UnicodeAudioLengthPathTestCase(AudioLengthPathTestCase, tcommon.UnicodeTes
def testUnicodePath(self):
# this test makes sure we can checksum a unicode path
self._testSuffix(u'morituri.test.B\xeate Noire.empty')
-
diff --git a/morituri/test/test_image_toc.py b/morituri/test/test_image_toc.py
index be85cad..c95a860 100644
--- a/morituri/test/test_image_toc.py
+++ b/morituri/test/test_image_toc.py
@@ -10,7 +10,9 @@ from morituri.image import toc
from morituri.test import common
+
class CureTestCase(common.TestCase):
+
def setUp(self):
self.toc = toc.TocFile(os.path.join(os.path.dirname(__file__),
u'cure.toc'))
@@ -91,7 +93,10 @@ class CureTestCase(common.TestCase):
'3/c/4/dBAR-013-0019d4c3-00fe8924-b90c650d.bin')
# Bloc Party - Silent Alarm has a Hidden Track One Audio
+
+
class BlocTestCase(common.TestCase):
+
def setUp(self):
self.toc = toc.TocFile(os.path.join(os.path.dirname(__file__),
u'bloc.toc'))
@@ -114,6 +119,7 @@ class BlocTestCase(common.TestCase):
self.assertEquals(t.getIndex(1).relative, 15220)
# This disc has a pre-gap, so is a good test for .CUE writing
+
def testConvertCue(self):
#self.toc.table.absolutize()
self.failUnless(self.toc.table.hasTOC())
@@ -138,7 +144,10 @@ class BlocTestCase(common.TestCase):
'e/d/2/dBAR-013-001af2de-0105994e-ad0be00d.bin')
# The Breeders - Mountain Battles has CDText
+
+
class BreedersTestCase(common.TestCase):
+
def setUp(self):
self.toc = toc.TocFile(os.path.join(os.path.dirname(__file__),
u'breeders.toc'))
@@ -164,7 +173,10 @@ class BreedersTestCase(common.TestCase):
self.assertEquals(cue, ref)
# Ladyhawke has a data track
+
+
class LadyhawkeTestCase(common.TestCase):
+
def setUp(self):
self.toc = toc.TocFile(os.path.join(os.path.dirname(__file__),
u'ladyhawke.toc'))
@@ -189,7 +201,9 @@ class LadyhawkeTestCase(common.TestCase):
def testDuration(self):
self.assertEquals(self.toc.table.duration(), 2761413)
+
class CapitalMergeTestCase(common.TestCase):
+
def setUp(self):
self.toc1 = toc.TocFile(os.path.join(os.path.dirname(__file__),
u'capital.1.toc'))
@@ -206,7 +220,6 @@ class CapitalMergeTestCase(common.TestCase):
self.table = copy.deepcopy(self.toc1.table)
self.table.merge(self.toc2.table)
-
def testCDDBId(self):
self.table.absolutize()
self.assertEquals(self.table.getCDDBDiscId(), 'b910140c')
@@ -226,6 +239,7 @@ class CapitalMergeTestCase(common.TestCase):
class UnicodeTestCase(common.TestCase, common.UnicodeTestMixin):
+
def setUp(self):
# we copy the normal non-utf8 filename to a utf-8 filename
# in this test because builds with LANG=C fail if we include
diff --git a/morituri/test/test_program_cdparanoia.py b/morituri/test/test_program_cdparanoia.py
index fca02d7..fe77b94 100644
--- a/morituri/test/test_program_cdparanoia.py
+++ b/morituri/test/test_program_cdparanoia.py
@@ -6,6 +6,7 @@ import unittest
from morituri.program import cdparanoia
+
class ParseTestCase(unittest.TestCase):
def setUp(self):
@@ -23,6 +24,7 @@ class ParseTestCase(unittest.TestCase):
q = '%.01f %%' % (self._parser.getTrackQuality() * 100.0, )
self.assertEquals(q, '99.7 %')
+
class ErrorTestCase(unittest.TestCase):
def setUp(self):
@@ -39,4 +41,3 @@ class ErrorTestCase(unittest.TestCase):
q = '%.01f %%' % (self._parser.getTrackQuality() * 100.0, )
self.assertEquals(q, '79.6 %')
-
diff --git a/morituri/test/test_program_cdrdao.py b/morituri/test/test_program_cdrdao.py
index 452d052..0a777dd 100644
--- a/morituri/test/test_program_cdrdao.py
+++ b/morituri/test/test_program_cdrdao.py
@@ -6,11 +6,15 @@ import unittest
from morituri.program import cdrdao
+
class FakeTask:
+
def setProgress(self, value):
pass
+
class ParseTestCase(unittest.TestCase):
+
def setUp(self):
path = os.path.join(os.path.dirname(__file__),
'cdrdao.readtoc.progress')
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list