From c50ee144dff3064fcaf7f658d9337cbc918f123e Mon Sep 17 00:00:00 2001 From: maxkoryukov Date: Wed, 3 Feb 2016 18:24:32 +0500 Subject: [PATCH] pep8 --- headphones/softchroot.py | 1 - headphones/softchroot_test.py | 1 - headphones/unittestcompat.py | 4 +++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/headphones/softchroot.py b/headphones/softchroot.py index a56c669d..5117a000 100644 --- a/headphones/softchroot.py +++ b/headphones/softchroot.py @@ -61,7 +61,6 @@ class SoftChroot(object): if os.path.sep == p[0]: p = p[1:] - p = self.chroot + p return p diff --git a/headphones/softchroot_test.py b/headphones/softchroot_test.py index e0db5edd..baa56703 100644 --- a/headphones/softchroot_test.py +++ b/headphones/softchroot_test.py @@ -60,7 +60,6 @@ class SoftChrootTest(TestCase): self.assertRegexpMatches(str(exc.exception), r'No such directory') self.assertRegexpMatches(str(exc.exception), path) - @TestArgs( (None, None), ('', ''), diff --git a/headphones/unittestcompat.py b/headphones/unittestcompat.py index c6055bf3..a9cc03a2 100644 --- a/headphones/unittestcompat.py +++ b/headphones/unittestcompat.py @@ -44,15 +44,17 @@ class TestCase(TC): def __init__(self, exc, tc): self.exc = exc self.tc = tc + def __enter__(self): return self + def __exit__(self, tp, value, traceback): tst = tp is self.exc self.tc.assertTrue(tst) self.exception = value return True - def assertRaises(self, exc, msg = None): + def assertRaises(self, exc, msg=None): if not _dummy: return super(TestCase, self).assertRaises(exc, msg) return TestCase._TestCaseRaiseStub(exc, self)