Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c29a2 commit adffcedCopy full SHA for adffced
1 file changed
Lib/test/script_helper.py
@@ -17,12 +17,13 @@
17
# Executing the interpreter in a subprocess
18
def _assert_python(expected_success, *args, **env_vars):
19
cmd_line = [sys.executable]
20
- if env_vars:
21
- env = env_vars
22
- else:
23
- env = os.environ
+ if not env_vars:
24
cmd_line.append('-E')
25
cmd_line.extend(args)
+ # Need to preserve the original environment, for in-place testing of
+ # shared library builds.
+ env = os.environ.copy()
26
+ env.update(env_vars)
27
p = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
28
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
29
env=env)
0 commit comments