diff --git a/src/Mod/Test/TestApp.py b/src/Mod/Test/TestApp.py index 6f851e2e0d..ab09b13cb4 100644 --- a/src/Mod/Test/TestApp.py +++ b/src/Mod/Test/TestApp.py @@ -68,7 +68,13 @@ def All(): def TestText(s): s = unittest.defaultTestLoader.loadTestsFromName(s) r = unittest.TextTestRunner(stream=sys.stdout, verbosity=2) - return r.run(s) + retval = r.run(s) + # Flushing to make sure the stream is written to the console + # before the wrapping process stops executing. Without this line + # executing the tests from command line did not show stats + # and proper tarceback in some cases. + sys.stdout.flush() + return retval def Test(s):