Skip to content

Commit 6c44619

Browse files
committed
regrtest: rename --slow option to --slowest
Thanks to optparse, --slow syntax still works ;-)
1 parent 717a32b commit 6c44619

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Lib/test/libregrtest/cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def _create_parser():
168168
help='display test output on failure')
169169
group.add_argument('-q', '--quiet', action='store_true',
170170
help='no output unless one or more tests fail')
171-
group.add_argument('-o', '--slow', action='store_true', dest='print_slow',
171+
group.add_argument('-o', '--slowest', action='store_true', dest='print_slow',
172172
help='print the slowest 10 tests')
173173
group.add_argument('--header', action='store_true',
174174
help='print header with interpreter info')

Lib/test/test_regrtest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_quiet(self):
109109
self.assertEqual(ns.verbose, 0)
110110

111111
def test_slow(self):
112-
for opt in '-o', '--slow':
112+
for opt in '-o', '--slowest':
113113
with self.subTest(opt=opt):
114114
ns = libregrtest._parse_args([opt])
115115
self.assertTrue(ns.print_slow)
@@ -661,25 +661,25 @@ def test_interrupted(self):
661661
self.check_executed_tests(output, test, omitted=test)
662662

663663
def test_slow(self):
664-
# test --slow
664+
# test --slowest
665665
tests = [self.create_test() for index in range(3)]
666-
output = self.run_tests("--slow", *tests)
666+
output = self.run_tests("--slowest", *tests)
667667
self.check_executed_tests(output, tests)
668668
regex = ('10 slowest tests:\n'
669669
'(?:%s: [0-9]+\.[0-9]+s\n){%s}'
670670
% (self.TESTNAME_REGEX, len(tests)))
671671
self.check_line(output, regex)
672672

673673
def test_slow_interrupted(self):
674-
# Issue #25373: test --slow with an interrupted test
674+
# Issue #25373: test --slowest with an interrupted test
675675
code = TEST_INTERRUPTED
676676
test = self.create_test("sigint", code=code)
677677

678678
for multiprocessing in (False, True):
679679
if multiprocessing:
680-
args = ("--slow", "-j2", test)
680+
args = ("--slowest", "-j2", test)
681681
else:
682-
args = ("--slow", test)
682+
args = ("--slowest", test)
683683
output = self.run_tests(*args, exitcode=1)
684684
self.check_executed_tests(output, test, omitted=test)
685685
regex = ('10 slowest tests:\n')

0 commit comments

Comments
 (0)