Commit 0fbac706 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

regrtest: fix test to choose if header should be displayed (#3172)

Check "tests" before its value is replaced.
parent 02d4292d
...@@ -572,6 +572,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -572,6 +572,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
nottests.add(arg) nottests.add(arg)
args = [] args = []
display_header = (verbose or header or not (quiet or single or tests or args)) and (not pgo)
alltests = findtests(testdir, stdtests, nottests) alltests = findtests(testdir, stdtests, nottests)
selected = tests or args or alltests selected = tests or args or alltests
if single: if single:
...@@ -657,8 +658,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -657,8 +658,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
sys.stdout.flush() sys.stdout.flush()
# For a partial run, we do not need to clutter the output. # For a partial run, we do not need to clutter the output.
if verbose or header or not (quiet or single or tests or args): if display_header:
if not pgo:
# Print basic platform information # Print basic platform information
print "==", platform.python_implementation(), \ print "==", platform.python_implementation(), \
" ".join(sys.version.split()) " ".join(sys.version.split())
......
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