self._testMethodName = methodName
unittest.TestCase.__init__(self, methodName)
self.todo = False
- # compat hack for older pythons
- if not self._exc_info and self.__exc_info
- self._exc_info = self.__exc_info
def defaultTestResult(self):
return TextTestResult()
except KeyboardInterrupt:
raise
except:
- result.addError(self, self._exc_info())
+ result.addError(self, sys.exc_info())
return
ok = False
try:
if self.todo:
result.addTodo(self,"%s: TODO" % testMethod)
else:
- result.addFailure(self, self._exc_info())
+ result.addFailure(self, sys.exc_info())
except (KeyboardInterrupt, SystemExit):
raise
except:
except KeyboardInterrupt:
raise
except:
- result.addError(self, self._exc_info())
+ result.addError(self, sys.exc_info())
ok = False
if ok: result.addSuccess(self)
finally: