summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2018-06-16 00:20:56 (GMT)
committerVictor Stinner <vstinner@redhat.com>2018-06-16 00:20:56 (GMT)
commitcac4fef8860e66a9da67d09762f5b614b9471a12 (patch)
tree259bee878a746c5d726b182f89b3378237293d57 /Lib
parent3a6d752e35ad17fc00bc77b85364b1c599f4e0fe (diff)
downloadcpython-cac4fef8860e66a9da67d09762f5b614b9471a12.zip
cpython-cac4fef8860e66a9da67d09762f5b614b9471a12.tar.gz
cpython-cac4fef8860e66a9da67d09762f5b614b9471a12.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/libregrtest/main.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 3429b37..569d034 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -462,6 +462,13 @@ class Regrtest:
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)