bump ________foo from the TestCase class since _exc_info() doesn't do anything anyway
authorAlec Warner <antarus@gentoo.org>
Sat, 17 Mar 2007 07:24:50 +0000 (07:24 -0000)
committerAlec Warner <antarus@gentoo.org>
Sat, 17 Mar 2007 07:24:50 +0000 (07:24 -0000)
svn path=/main/trunk/; revision=6228

pym/portage/tests/__init__.py

index 3eaec03ecfd08cdd10a19452585c9d35cce70dd8..b7640ab2cb187083ce4dd5dbb0453dde97b42a8d 100644 (file)
@@ -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: