[Python-checkins] bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

Victor Stinner webhook-mailer at python.org
Fri Jun 15 20:21:00 EDT 2018


https://github.com/python/cpython/commit/cac4fef8860e66a9da67d09762f5b614b9471a12
commit: cac4fef8860e66a9da67d09762f5b614b9471a12
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: Victor Stinner <vstinner at redhat.com>
date: 2018-06-16T02:20:56+02:00
summary:

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.

files:
M Lib/test/libregrtest/main.py

diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 3429b3726abe..569d034af1a3 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -462,6 +462,13 @@ def run_tests(self):
                    or self.tests or self.ns.args)):
             self.display_header()
 
+        if self.ns.huntrleaks:
+            warmup, repetitions, _ = self.ns.huntrleaks
+            if warmup < 3:
+                msg = ("WARNING: Running tests with --huntrleaks/-R and less than "
+                        "3 warmup repetitions can give false positives!")
+                print(msg, file=sys.stdout, flush=True)
+
         if self.ns.randomize:
             print("Using random seed", self.ns.random_seed)
 



More information about the Python-checkins mailing list