summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-03 07:56:50 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-03 07:56:50 (GMT)
commite8e02e3b5bcb28ff76975c3f9a29af874e005f81 (patch)
tree9c13df5f0658df2429a75f8ea892c7aafe44dabc
parentfcd77016b31ea9fb5311695f5ca82cf6c235da87 (diff)
downloadcpython-e8e02e3b5bcb28ff76975c3f9a29af874e005f81.zip
cpython-e8e02e3b5bcb28ff76975c3f9a29af874e005f81.tar.gz
cpython-e8e02e3b5bcb28ff76975c3f9a29af874e005f81.tar.bz2
Fix regrtest -F.
-rwxr-xr-xLib/test/regrtest.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index f648d95..f3f3553 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -514,12 +514,13 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
if bad:
return
tests = test_forever()
+ test_count = ''
+ test_count_width = 3
else:
tests = iter(selected)
+ test_count = '/{}'.format(len(selected))
+ test_count_width = len(test_count) - 1
- tests = list(tests)
- test_count = len(tests)
- test_count_width = len(str(test_count))
if use_mp:
try:
from threading import Thread
@@ -578,7 +579,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
finished += 1
continue
if not quiet:
- print("[{1:{0}}/{2:{0}}] {3}".format(
+ print("[{1:{0}}{2}] {3}".format(
test_count_width, test_index, test_count, test))
if stdout:
print(stdout)
@@ -597,7 +598,7 @@ 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:{0}}] {3}".format(
+ print("[{1:{0}}{2}] {3}".format(
test_count_width, test_index, test_count, test))
sys.stdout.flush()
if trace: