Commit 355adc5a authored by Florent Xicluna's avatar Florent Xicluna

Ensure that the failed or unexpected tests are sorted before printing.

parent eee91cda
...@@ -580,12 +580,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -580,12 +580,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
if module not in save_modules and module.startswith("test."): if module not in save_modules and module.startswith("test."):
test_support.unload(module) test_support.unload(module)
# The lists won't be sorted if running with -r
good.sort()
bad.sort()
skipped.sort()
environment_changed.sort()
if good and not quiet: if good and not quiet:
if not bad and not skipped and len(good) > 1: if not bad and not skipped and len(good) > 1:
print "All", print "All",
...@@ -1090,7 +1084,8 @@ def printlist(x, width=70, indent=4): ...@@ -1090,7 +1084,8 @@ def printlist(x, width=70, indent=4):
from textwrap import fill from textwrap import fill
blanks = ' ' * indent blanks = ' ' * indent
print fill(' '.join(str(elt) for elt in x), width, # Print the sorted list: 'x' may be a '--random' list or a set()
print fill(' '.join(str(elt) for elt in sorted(x)), width,
initial_indent=blanks, subsequent_indent=blanks) initial_indent=blanks, subsequent_indent=blanks)
# Map sys.platform to a string containing the basenames of tests # Map sys.platform to a string containing the basenames of tests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment