[Python-checkins] cpython (merge 3.5 -> 3.6): Issue #28950: Disallow -j0 combined with -T/-l in regrtest.
xiang.zhang
python-checkins at python.org
Mon Dec 19 09:15:05 EST 2016
https://hg.python.org/cpython/rev/692834062e80
changeset: 105751:692834062e80
branch: 3.6
parent: 105746:283632069a0d
parent: 105750:cf564121f9f0
user: Xiang Zhang <angwerzx at 126.com>
date: Mon Dec 19 22:00:22 2016 +0800
summary:
Issue #28950: Disallow -j0 combined with -T/-l in regrtest.
files:
Lib/test/libregrtest/cmdline.py | 4 ++--
Lib/test/regrtest.py | 0
Lib/test/test_regrtest.py | 2 ++
Misc/NEWS | 3 +++
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Lib/test/libregrtest/cmdline.py b/Lib/test/libregrtest/cmdline.py
--- a/Lib/test/libregrtest/cmdline.py
+++ b/Lib/test/libregrtest/cmdline.py
@@ -301,9 +301,9 @@
if ns.single and ns.fromfile:
parser.error("-s and -f don't go together!")
- if ns.use_mp and ns.trace:
+ if ns.use_mp is not None and ns.trace:
parser.error("-T and -j don't go together!")
- if ns.use_mp and ns.findleaks:
+ if ns.use_mp is not None and ns.findleaks:
parser.error("-l and -j don't go together!")
if ns.failfast and not (ns.verbose or ns.verbose3):
parser.error("-G/--failfast needs either -v or -W")
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
old mode 100644
new mode 100755
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -226,6 +226,8 @@
self.checkError([opt, 'foo'], 'invalid int value')
self.checkError([opt, '2', '-T'], "don't go together")
self.checkError([opt, '2', '-l'], "don't go together")
+ self.checkError([opt, '0', '-T'], "don't go together")
+ self.checkError([opt, '0', '-l'], "don't go together")
def test_coverage(self):
for opt in '-T', '--coverage':
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,9 @@
Tests
-----
+- Issue #28950: Disallow -j0 to be combined with -T/-l in regrtest
+ command line arguments.
+
- Issue #28683: Fix the tests that bind() a unix socket and raise
PermissionError on Android for a non-root user.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list