fix to flush stdout after unit test execution
- added statement to flush the stdout
This commit is contained in:
committed by
wmayer
parent
b2e9bef612
commit
0787ed8fbf
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user