mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Fix TypeError on usage() when using regrtest switches which are not compatible.
This commit is contained in:
parent
085a656c81
commit
64fb18e192
1 changed files with 3 additions and 2 deletions
|
@ -162,6 +162,7 @@ import tempfile
|
||||||
import platform
|
import platform
|
||||||
import sysconfig
|
import sysconfig
|
||||||
|
|
||||||
|
|
||||||
# Some times __path__ and __file__ are not absolute (e.g. while running from
|
# Some times __path__ and __file__ are not absolute (e.g. while running from
|
||||||
# Lib/) and, if we change the CWD to run the tests in a temporary dir, some
|
# Lib/) and, if we change the CWD to run the tests in a temporary dir, some
|
||||||
# imports might fail. This affects only the modules imported before os.chdir().
|
# imports might fail. This affects only the modules imported before os.chdir().
|
||||||
|
@ -385,9 +386,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
if single and fromfile:
|
if single and fromfile:
|
||||||
usage("-s and -f don't go together!")
|
usage("-s and -f don't go together!")
|
||||||
if use_mp and trace:
|
if use_mp and trace:
|
||||||
usage(2, "-T and -j don't go together!")
|
usage("-T and -j don't go together!")
|
||||||
if use_mp and findleaks:
|
if use_mp and findleaks:
|
||||||
usage(2, "-l and -j don't go together!")
|
usage("-l and -j don't go together!")
|
||||||
if use_mp and max(sys.flags):
|
if use_mp and max(sys.flags):
|
||||||
# TODO: inherit the environment and the flags
|
# TODO: inherit the environment and the flags
|
||||||
print("Warning: flags and environment variables are ignored with -j option")
|
print("Warning: flags and environment variables are ignored with -j option")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue