Commit d2653629 authored by Jérome Perrin's avatar Jérome Perrin

runUnitTest: use TestCase.debug for multi-node test cases

The default TestCase.__call__ collects errors in a test result that
was never retrieved, so errors were silently ignored.

By using TestCase.debug , we let errors propagate.

---

Minimal reproduction is running directly (ie. not with python -m unittest)
a script like this:

    import unittest

    class T(unittest.TestCase):
      def method(self):
        print('ah ?')
        boom
        print('oh')

    t = T("method")
    t()  # no error
    t.debug()  # NameError: name 'boom' is not defined
parent 924cf90a
......@@ -682,7 +682,7 @@ def runUnitTestList(test_list, verbosity=1, debug=0, run_only=None):
ERP5TypeTestLoader.filter_test_list = None
if node_pid_list is None:
result = suite()
result = suite.debug()
else:
if not test_list:
root_logger.handlers.append(loghandler.StreamHandler(sys.stderr))
......
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