diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-03-26 16:32:23 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-03-26 16:32:23 (GMT) |
commit | c9301355d8e176a4ec9952a44a7728d8663bf21b (patch) | |
tree | e72d0c3fc5a08adcc4566e6bfce4d4a67e336513 /Lib | |
parent | 2dc90fdfaf79404ebbc91328af258b7895f86132 (diff) | |
download | cpython-c9301355d8e176a4ec9952a44a7728d8663bf21b.zip cpython-c9301355d8e176a4ec9952a44a7728d8663bf21b.tar.gz cpython-c9301355d8e176a4ec9952a44a7728d8663bf21b.tar.bz2 |
remove uneeded function
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/unittest.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py index 57e45d2..a55a7d8 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -373,14 +373,14 @@ class TestCase(object): result.addSkip(self, str(e)) return except Exception: - result.addError(self, self._exc_info()) + result.addError(self, sys.exc_info()) return success = False try: testMethod() except self.failureException: - result.addFailure(self, self._exc_info()) + result.addFailure(self, sys.exc_info()) except _ExpectedFailure as e: result.addExpectedFailure(self, e.exc_info) except _UnexpectedSuccess: @@ -388,14 +388,14 @@ class TestCase(object): except SkipTest as e: result.addSkip(self, str(e)) except Exception: - result.addError(self, self._exc_info()) + result.addError(self, sys.exc_info()) else: success = True try: self.tearDown() except Exception: - result.addError(self, self._exc_info()) + result.addError(self, sys.exc_info()) success = False if success: result.addSuccess(self) @@ -411,13 +411,6 @@ class TestCase(object): getattr(self, self._testMethodName)() self.tearDown() - def _exc_info(self): - """Return a version of sys.exc_info() with the traceback frame - minimised; usually the top level of the traceback frame is not - needed. - """ - return sys.exc_info() - def skip(self, reason): """Skip this test.""" raise SkipTest(reason) |