From: Victor Stinner Date: Wed, 29 Jun 2011 13:38:18 +0000 (+0200) Subject: (merge 3.2) Issue #12400: regrtest, force verbose mode to True with option -W X-Git-Tag: v3.3.0a1~2013 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba089050624ccdff841a3eea88f0f13bfa0a437b;p=python (merge 3.2) Issue #12400: regrtest, force verbose mode to True with option -W If verbose is False, the output is empty. Fix also a typo in a variable name. --- ba089050624ccdff841a3eea88f0f13bfa0a437b diff --cc Lib/test/regrtest.py index d64494ed82,75d8795aff..4d13fc76a3 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@@ -834,17 -783,16 +834,19 @@@ def runtest(test, verbose, quiet if use_resources is not None: support.use_resources = use_resources + use_timeout = (timeout is not None) + if use_timeout: + faulthandler.dump_tracebacks_later(timeout, exit=True) try: - support.verbose = verbose # Tell tests to be moderately quiet if output_on_failure: + support.verbose = True + + # Reuse the same instance to all calls to runtest(). Some + # tests keep a reference to sys.stdout or sys.stderr + # (eg. test_argparse). if runtest.stringio is None: - # Reuse the same instance to all calls to runtest(). Some - # tests keep a reference to sys.stdout or sys.stderr - # (eg. test_argparse). runtest.stringio = io.StringIO() + stream = runtest.stringio orig_stdout = sys.stdout orig_stderr = sys.stderr