mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
pep8
This commit is contained in:
@@ -62,6 +62,5 @@ class SoftChroot(object):
|
|||||||
if os.path.sep == p[0]:
|
if os.path.sep == p[0]:
|
||||||
p = p[1:]
|
p = p[1:]
|
||||||
|
|
||||||
|
|
||||||
p = self.chroot + p
|
p = self.chroot + p
|
||||||
return p
|
return p
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ class SoftChrootTest(TestCase):
|
|||||||
self.assertRegexpMatches(str(exc.exception), r'No such directory')
|
self.assertRegexpMatches(str(exc.exception), r'No such directory')
|
||||||
self.assertRegexpMatches(str(exc.exception), path)
|
self.assertRegexpMatches(str(exc.exception), path)
|
||||||
|
|
||||||
|
|
||||||
@TestArgs(
|
@TestArgs(
|
||||||
(None, None),
|
(None, None),
|
||||||
('', ''),
|
('', ''),
|
||||||
|
|||||||
@@ -44,15 +44,17 @@ class TestCase(TC):
|
|||||||
def __init__(self, exc, tc):
|
def __init__(self, exc, tc):
|
||||||
self.exc = exc
|
self.exc = exc
|
||||||
self.tc = tc
|
self.tc = tc
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(self, tp, value, traceback):
|
def __exit__(self, tp, value, traceback):
|
||||||
tst = tp is self.exc
|
tst = tp is self.exc
|
||||||
self.tc.assertTrue(tst)
|
self.tc.assertTrue(tst)
|
||||||
self.exception = value
|
self.exception = value
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def assertRaises(self, exc, msg = None):
|
def assertRaises(self, exc, msg=None):
|
||||||
if not _dummy:
|
if not _dummy:
|
||||||
return super(TestCase, self).assertRaises(exc, msg)
|
return super(TestCase, self).assertRaises(exc, msg)
|
||||||
return TestCase._TestCaseRaiseStub(exc, self)
|
return TestCase._TestCaseRaiseStub(exc, self)
|
||||||
|
|||||||
Reference in New Issue
Block a user