[Erp5-report] r30090 - /erp5/trunk/products/ERP5Type/tests/runUnitTest.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 29 08:29:19 CET 2009
Author: nicolas.dumazet
Date: Thu Oct 29 08:29:19 2009
New Revision: 30090
URL: http://svn.erp5.org?rev=30090&view=rev
Log:
Introduce DebugTextTestRunner to extend TextTestRunner instead of wrapping
test runs.
Modified:
erp5/trunk/products/ERP5Type/tests/runUnitTest.py
Modified: erp5/trunk/products/ERP5Type/tests/runUnitTest.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/runUnitTest.py?rev=30090&r1=30089&r2=30090&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/runUnitTest.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/runUnitTest.py [utf8] Thu Oct 29 08:29:19 2009
@@ -332,14 +332,20 @@
# Hack the profiler to run only specified test methods, and wrap results when
# running in debug mode.
if not dummy_test:
+ if debug:
+ class DebugTextTestRunner(backportUnittest.TextTestRunner):
+ def _makeResult(self):
+ result = super(DebugTextTestRunner, self)._makeResult()
+ return DebugTestResult(result)
+
+ TestRunner = DebugTextTestRunner
+
test_method_list = os.environ.get('run_only', '').split(',')
def wrapped_run(run_orig):
# wrap the method that run the test to run test method only if its name
# matches the run_only spec and to provide post mortem debugging facility
def run(self, result=None):
- if debug and result:
- result = DebugTestResult(result)
if not test_method_list:
return run_orig(self, result)
test_method_name = self.id().rsplit('.', 1)[-1]
More information about the Erp5-report
mailing list