mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Merge 3.2: Issue #13703 plus some related test suite fixes.
This commit is contained in:
commit
2fb477c0f0
38 changed files with 706 additions and 174 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import os.path
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
@ -20,11 +19,15 @@ def _assert_python(expected_success, *args, **env_vars):
|
|||
cmd_line = [sys.executable]
|
||||
if not env_vars:
|
||||
cmd_line.append('-E')
|
||||
cmd_line.extend(args)
|
||||
# Need to preserve the original environment, for in-place testing of
|
||||
# shared library builds.
|
||||
env = os.environ.copy()
|
||||
# But a special flag that can be set to override -- in this case, the
|
||||
# caller is responsible to pass the full environment.
|
||||
if env_vars.pop('__cleanenv', None):
|
||||
env = {}
|
||||
env.update(env_vars)
|
||||
cmd_line.extend(args)
|
||||
p = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
env=env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue