summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-05-23 22:01:08 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-05-23 22:01:08 (GMT)
commit64af7c0d36ae78881b127643052d43316da9f52c (patch)
treec47de0395f9f3b0d081a44af6d4978870cd10082 /Lib/test
parent17ec7cd9ca28ae2e8320a740d00927dcaed67274 (diff)
parent84f75c680c2a17954155e71455061599e8778ccb (diff)
downloadcpython-64af7c0d36ae78881b127643052d43316da9f52c.zip
cpython-64af7c0d36ae78881b127643052d43316da9f52c.tar.gz
cpython-64af7c0d36ae78881b127643052d43316da9f52c.tar.bz2
#12074: merge with 3.2.
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/regrtest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index ccbe6f9..04e87e3 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -632,7 +632,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
continue
accumulate_result(test, result)
if not quiet:
- print("[{1:{0}}{2}/{3}] {4}".format(
+ fmt = "[{1:{0}}{2}/{3}] {4}" if bad else "[{1:{0}}{2}] {4}"
+ print(fmt.format(
test_count_width, test_index, test_count,
len(bad), test))
if stdout:
@@ -653,7 +654,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
else:
for test_index, test in enumerate(tests, 1):
if not quiet:
- print("[{1:{0}}{2}/{3}] {4}".format(
+ fmt = "[{1:{0}}{2}/{3}] {4}" if bad else "[{1:{0}}{2}] {4}"
+ print(fmt.format(
test_count_width, test_index, test_count, len(bad), test))
sys.stdout.flush()
if trace: