Commit 3be9c809 authored by Nicolas Dumazet's avatar Nicolas Dumazet

ERP5TypeTestCase.__call__ also needs to be wrapped since r30085


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30089 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0746c83
......@@ -330,8 +330,7 @@ def runUnitTestList(test_list, verbosity=1, debug=0):
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 @@ def runUnitTestList(test_list, verbosity=1, debug=0):
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__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment