changeset: 105750:cf564121f9f0 branch: 3.5 parent: 105745:cb802a78ceea user: Xiang Zhang date: Mon Dec 19 21:01:33 2016 +0800 files: Lib/test/regrtest.py Lib/test/test_regrtest.py Misc/NEWS description: Issue #28950: Disallow -j0 combined with -T/-l/-M in regrtest. diff -r cb802a78ceea -r cf564121f9f0 Lib/test/regrtest.py --- a/Lib/test/regrtest.py Mon Dec 19 13:09:28 2016 +0100 +++ b/Lib/test/regrtest.py Mon Dec 19 21:01:33 2016 +0800 @@ -380,11 +380,11 @@ 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.use_mp and ns.memlimit: + if ns.use_mp is not None and ns.memlimit: parser.error("-M 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 -r cb802a78ceea -r cf564121f9f0 Lib/test/test_regrtest.py --- a/Lib/test/test_regrtest.py Mon Dec 19 13:09:28 2016 +0100 +++ b/Lib/test/test_regrtest.py Mon Dec 19 21:01:33 2016 +0800 @@ -200,6 +200,9 @@ self.checkError([opt, '2', '-T'], "don't go together") self.checkError([opt, '2', '-l'], "don't go together") self.checkError([opt, '2', '-M', '4G'], "don't go together") + self.checkError([opt, '0', '-T'], "don't go together") + self.checkError([opt, '0', '-l'], "don't go together") + self.checkError([opt, '0', '-M', '4G'], "don't go together") def test_coverage(self): for opt in '-T', '--coverage': diff -r cb802a78ceea -r cf564121f9f0 Misc/NEWS --- a/Misc/NEWS Mon Dec 19 13:09:28 2016 +0100 +++ b/Misc/NEWS Mon Dec 19 21:01:33 2016 +0800 @@ -549,6 +549,9 @@ Tests ----- +- Issue #28950: Disallow -j0 to be combined with -T/-l/-M in regrtest + command line arguments. + - Issue #28666: Now test.support.rmtree is able to remove unwritable or unreadable directories.