remove uneeded function

This commit is contained in:
Benjamin Peterson 2009-03-26 16:32:23 +00:00
parent 2dc90fdfaf
commit c9301355d8
1 changed files with 4 additions and 11 deletions

View File

@ -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)