This commit is contained in:
maxkoryukov
2016-02-03 18:24:32 +05:00
parent f5f32d902b
commit c50ee144df
3 changed files with 3 additions and 3 deletions
-1
View File
@@ -61,7 +61,6 @@ 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
-1
View File
@@ -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),
('', ''), ('', ''),
+3 -1
View File
@@ -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)