Merged revisions 79195,79425,79427,79450 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79195 | florent.xicluna | 2010-03-21 13:27:20 +0100 (dim, 21 mar 2010) | 2 lines
Issue #8179: Fix macpath.realpath() on a non-existing path.
........
r79425 | florent.xicluna | 2010-03-25 21:32:07 +0100 (jeu, 25 mar 2010) | 2 lines
Syntax cleanup `== None` -> `is None`
........
r79427 | florent.xicluna | 2010-03-25 21:39:10 +0100 (jeu, 25 mar 2010) | 2 lines
Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest"
........
r79450 | florent.xicluna | 2010-03-26 20:32:44 +0100 (ven, 26 mar 2010) | 2 lines
Ensure that the failed or unexpected tests are sorted before printing.
........
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 7077787..cb55b47 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -399,11 +399,6 @@
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()
-
if good and not quiet:
if not bad and not skipped and len(good) > 1:
print "All",
@@ -757,7 +752,8 @@
from textwrap import fill
blanks = ' ' * indent
- print fill(' '.join(map(str, 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