summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorKristján Valur Jónsson <sweskman@gmail.com>2013-03-19 22:07:35 (GMT)
committerKristján Valur Jónsson <sweskman@gmail.com>2013-03-19 22:07:35 (GMT)
commit8927e8f4211dc50b87a6365ed7281452a1931ebf (patch)
treec519bb98128d6fa159ea2ea9b2e1a8c9f2b69067 /Lib/test/test_support.py
parentac0866f2ab9aa43c635618681682dd9f6da6219e (diff)
downloadcpython-8927e8f4211dc50b87a6365ed7281452a1931ebf.zip
cpython-8927e8f4211dc50b87a6365ed7281452a1931ebf.tar.gz
cpython-8927e8f4211dc50b87a6365ed7281452a1931ebf.tar.bz2
Issue #12098: multiprocessing on Windows now starts child processes
using the same sys.flags as the current process. Backport from default branch.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 034a374..b3076c1 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -1344,22 +1344,7 @@ def py3k_bytes(b):
def args_from_interpreter_flags():
"""Return a list of command-line arguments reproducing the current
settings in sys.flags."""
- flag_opt_map = {
- 'bytes_warning': 'b',
- 'dont_write_bytecode': 'B',
- 'ignore_environment': 'E',
- 'no_user_site': 's',
- 'no_site': 'S',
- 'optimize': 'O',
- 'py3k_warning': '3',
- 'verbose': 'v',
- }
- args = []
- for flag, opt in flag_opt_map.items():
- v = getattr(sys.flags, flag)
- if v > 0:
- args.append('-' + opt * v)
- return args
+ return subprocess._args_from_interpreter_flags()
def strip_python_stderr(stderr):
"""Strip the stderr of a Python process from potential debug output