summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-23 21:16:09 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-23 21:16:09 (GMT)
commit08c719eb955fd5fb8bb3e39c9c39e5b50b539179 (patch)
tree32f6a1649ec5bbf7e3feb1aa108c551f2dcec4ab
parentacd902be6466729ffc2f2cece9bf5e945d64619b (diff)
parenta2a895c46c8e838a29308dd0da7ab1d364ff4495 (diff)
downloadcpython-08c719eb955fd5fb8bb3e39c9c39e5b50b539179.zip
cpython-08c719eb955fd5fb8bb3e39c9c39e5b50b539179.tar.gz
cpython-08c719eb955fd5fb8bb3e39c9c39e5b50b539179.tar.bz2
(Merge 3.2) Issue #12074: regrtest displays also the current number of failures
-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 2a08de4..ccbe6f9 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -630,9 +630,11 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
if test is None:
finished += 1
continue
+ accumulate_result(test, result)
if not quiet:
- print("[{1:{0}}{2}] {3}".format(
- test_count_width, test_index, test_count, test))
+ print("[{1:{0}}{2}/{3}] {4}".format(
+ test_count_width, test_index, test_count,
+ len(bad), test))
if stdout:
print(stdout)
if stderr:
@@ -642,7 +644,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
raise KeyboardInterrupt # What else?
if result[0] == CHILD_ERROR:
raise Exception("Child error on {}: {}".format(test, result[1]))
- accumulate_result(test, result)
test_index += 1
except KeyboardInterrupt:
interrupted = True
@@ -652,8 +653,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}".format(
- test_count_width, test_index, test_count, test))
+ print("[{1:{0}}{2}/{3}] {4}".format(
+ test_count_width, test_index, test_count, len(bad), test))
sys.stdout.flush()
if trace:
# If we're tracing code coverage, then we don't exit with status