Do not print the header lines when running a single test.

This commit is contained in:
Florent Xicluna 2010-03-06 17:24:36 +00:00
parent 1adbee226e
commit 58526417ed
2 changed files with 12 additions and 7 deletions

View File

@ -374,13 +374,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
resource_denieds = [] resource_denieds = []
environment_changed = [] environment_changed = []
if not quiet:
# Print basic platform information
print "==", platform.python_implementation(), \
" ".join(sys.version.split())
print "== ", platform.platform(aliased=True)
print "== ", os.getcwd()
if findleaks: if findleaks:
try: try:
import gc import gc
@ -425,6 +418,15 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
stdtests.remove(arg) stdtests.remove(arg)
nottests.add(arg) nottests.add(arg)
args = [] args = []
# For a partial run, we do not need to clutter the output.
if verbose or not (quiet or tests or args):
# Print basic platform information
print "==", platform.python_implementation(), \
" ".join(sys.version.split())
print "== ", platform.platform(aliased=True)
print "== ", os.getcwd()
alltests = findtests(testdir, stdtests, nottests) alltests = findtests(testdir, stdtests, nottests)
tests = tests or args or alltests tests = tests or args or alltests
if single: if single:

View File

@ -126,6 +126,9 @@ Extension Modules
Tests Tests
----- -----
- Print platform information when running the whole test suite, or using
the --verbose flag.
- Issue #767675: enable test_pep277 on POSIX platforms with Unicode-friendly - Issue #767675: enable test_pep277 on POSIX platforms with Unicode-friendly
filesystem encoding. filesystem encoding.