mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #12074: regrtest displays also the current number of failures
This commit is contained in:
parent
4b244ef255
commit
a2a895c46c
1 changed files with 6 additions and 5 deletions
|
@ -580,9 +580,11 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
if test is None:
|
if test is None:
|
||||||
finished += 1
|
finished += 1
|
||||||
continue
|
continue
|
||||||
|
accumulate_result(test, result)
|
||||||
if not quiet:
|
if not quiet:
|
||||||
print("[{1:{0}}{2}] {3}".format(
|
print("[{1:{0}}{2}/{3}] {4}".format(
|
||||||
test_count_width, test_index, test_count, test))
|
test_count_width, test_index, test_count,
|
||||||
|
len(bad), test))
|
||||||
if stdout:
|
if stdout:
|
||||||
print(stdout)
|
print(stdout)
|
||||||
if stderr:
|
if stderr:
|
||||||
|
@ -590,7 +592,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
if result[0] == INTERRUPTED:
|
if result[0] == INTERRUPTED:
|
||||||
assert result[1] == 'KeyboardInterrupt'
|
assert result[1] == 'KeyboardInterrupt'
|
||||||
raise KeyboardInterrupt # What else?
|
raise KeyboardInterrupt # What else?
|
||||||
accumulate_result(test, result)
|
|
||||||
test_index += 1
|
test_index += 1
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
interrupted = True
|
interrupted = True
|
||||||
|
@ -600,8 +601,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
else:
|
else:
|
||||||
for test_index, test in enumerate(tests, 1):
|
for test_index, test in enumerate(tests, 1):
|
||||||
if not quiet:
|
if not quiet:
|
||||||
print("[{1:{0}}{2}] {3}".format(
|
print("[{1:{0}}{2}/{3}] {4}".format(
|
||||||
test_count_width, test_index, test_count, test))
|
test_count_width, test_index, test_count, len(bad), test))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
if trace:
|
if trace:
|
||||||
# If we're tracing code coverage, then we don't exit with status
|
# If we're tracing code coverage, then we don't exit with status
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue