diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-26 19:32:44 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-26 19:32:44 (GMT) |
commit | 355adc5a451ce3b22b66a3af883d35e89e2a0eab (patch) | |
tree | 603b57a0d760b9fa732915496f84366365fc4cb6 /Lib/test/regrtest.py | |
parent | eee91cda8012d7d39c0401a0465af736aa2d136a (diff) | |
download | cpython-355adc5a451ce3b22b66a3af883d35e89e2a0eab.zip cpython-355adc5a451ce3b22b66a3af883d35e89e2a0eab.tar.gz cpython-355adc5a451ce3b22b66a3af883d35e89e2a0eab.tar.bz2 |
Ensure that the failed or unexpected tests are sorted before printing.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ef809fd..daabc04 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -580,12 +580,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, if module not in save_modules and module.startswith("test."): 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 not bad and not skipped and len(good) > 1: print "All", @@ -1090,7 +1084,8 @@ def printlist(x, width=70, indent=4): from textwrap import fill 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) # Map sys.platform to a string containing the basenames of tests |