summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index c985c50..8d81bc9 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -453,11 +453,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
if module not in save_modules and module.startswith("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", end=' ')
@@ -893,7 +888,8 @@ def printlist(x, width=70, indent=4):
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