]> granicus.if.org Git - python/commitdiff
Do not print the header lines when running a single test.
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 6 Mar 2010 17:24:36 +0000 (17:24 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 6 Mar 2010 17:24:36 +0000 (17:24 +0000)
Lib/test/regrtest.py
Misc/NEWS

index b7fc87577429af9dda1b982ed19685f3d87dc13e..0f5820865cc5abe2014572077d89afac6d1f44bf 100755 (executable)
@@ -374,13 +374,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
     resource_denieds = []
     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:
         try:
             import gc
@@ -425,6 +418,15 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
                 stdtests.remove(arg)
             nottests.add(arg)
         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)
     tests = tests or args or alltests
     if single:
index e6662e8b12fe30cdfe99ffb10369ae8edbe29660..a60e6fd136fbc6f9d984e145b9e24fc64c390bd8 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -126,6 +126,9 @@ Extension Modules
 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
   filesystem encoding.