• Jérome Perrin's avatar
    runUnitTest: use TestCase.debug for multi-node test cases · d2653629
    Jérome Perrin authored
    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
    d2653629
runUnitTest.py 38.7 KB