[Erp5-report] r30089 - /erp5/trunk/products/ERP5Type/tests/runUnitTest.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 29 07:52:20 CET 2009
Author: nicolas.dumazet
Date: Thu Oct 29 07:52:19 2009
New Revision: 30089
URL: http://svn.erp5.org?rev=30089&view=rev
Log:
ERP5TypeTestCase.__call__ also needs to be wrapped since r30085
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=30089&r1=30088&r2=30089&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/runUnitTest.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/runUnitTest.py [utf8] Thu Oct 29 07:52:19 2009
@@ -330,8 +330,7 @@
suite = test_loader.loadTestsFromNames(test_list)
# Hack the profiler to run only specified test methods, and wrap results when
- # running in debug mode. We also monkeypatch unittest.TestCase for tests that
- # does not use ERP5TypeTestCase
+ # running in debug mode.
if not dummy_test:
test_method_list = os.environ.get('run_only', '').split(',')
@@ -349,8 +348,14 @@
return run_orig(self, result)
return run
+ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+ ERP5TypeTestCase.__call__ = wrapped_run(ERP5TypeTestCase.__call__)
+
+ # for tests subclassing ZopeTestCase but not ERP5TypeTestCase
from Testing.ZopeTestCase import profiler
profiler.Profiled.__call__ = wrapped_run(profiler.Profiled.__call__)
+
+ # tests not using ERP5TypeTestCase or ZopeTestCase
from unittest import TestCase
TestCase.__call__ = wrapped_run(TestCase.__call__)
More information about the Erp5-report
mailing list