Skip to content

Commit cac4fef

Browse files
pablogsalvstinner
authored andcommitted
bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)
regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
1 parent 3a6d752 commit cac4fef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/libregrtest/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,13 @@ def run_tests(self):
462462
or self.tests or self.ns.args)):
463463
self.display_header()
464464

465+
if self.ns.huntrleaks:
466+
warmup, repetitions, _ = self.ns.huntrleaks
467+
if warmup < 3:
468+
msg = ("WARNING: Running tests with --huntrleaks/-R and less than "
469+
"3 warmup repetitions can give false positives!")
470+
print(msg, file=sys.stdout, flush=True)
471+
465472
if self.ns.randomize:
466473
print("Using random seed", self.ns.random_seed)
467474

0 commit comments

Comments
 (0)