From dc9dc58c652a817121298e80ffb6689547a6aa4a Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Sat, 17 Mar 2007 07:24:50 +0000 Subject: [PATCH] bump ________foo from the TestCase class since _exc_info() doesn't do anything anyway svn path=/main/trunk/; revision=6228 --- pym/portage/tests/__init__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index 3eaec03ec..b7640ab2c 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -85,9 +85,6 @@ class TestCase(unittest.TestCase): 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() @@ -102,7 +99,7 @@ class TestCase(unittest.TestCase): except KeyboardInterrupt: raise except: - result.addError(self, self._exc_info()) + result.addError(self, sys.exc_info()) return ok = False try: @@ -112,7 +109,7 @@ class TestCase(unittest.TestCase): 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: @@ -122,7 +119,7 @@ class TestCase(unittest.TestCase): except KeyboardInterrupt: raise except: - result.addError(self, self._exc_info()) + result.addError(self, sys.exc_info()) ok = False if ok: result.addSuccess(self) finally: -- 2.26.2