[pypy-svn] pypy default: Fix display when test.regrtest is run with -v: no detail was displayed.

amauryfa commits-noreply at bitbucket.org
Wed Jan 19 09:58:45 CET 2011

Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Changeset: r40924:80a679a3840a
Date: 2011-01-19 09:55 +0100

Log:	Fix display when test.regrtest is run with -v: no detail was
	displayed. BTW, test.regrtest without -v did not work at all.

diff --git a/lib-python/modified-2.7.0/test/test_support.py b/lib-python/modified-2.7.0/test/test_support.py
--- a/lib-python/modified-2.7.0/test/test_support.py
+++ b/lib-python/modified-2.7.0/test/test_support.py
@@ -1057,10 +1057,12 @@
 #     python ..../test_foo.py --pdb
 # to get a pdb prompt in case of exceptions
-class TestResultWithPdb(unittest.result.TestResult):
+ResultClass = unittest.TextTestRunner.resultclass
+class TestResultWithPdb(ResultClass):
     def addError(self, testcase, exc_info):
-        unittest.result.TestResult.addError(self, testcase, exc_info)
+        ResultClass.addError(self, testcase, exc_info)
         if '--pdb' in sys.argv:
             import pdb, traceback
@@ -1074,7 +1076,7 @@
         runner = unittest.TextTestRunner(sys.stdout, verbosity=2,
-        runner = BasicTestRunner(resultclass=TestResultWithPdb)
+        runner = BasicTestRunner()
     result = runner.run(suite)

More information about the Pypy-commit mailing list