mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
subprocess test_empty_env typo fix. (#1877)
This commit is contained in:
parent
9efad1e5ae
commit
85aba238e4
1 changed files with 3 additions and 3 deletions
|
@ -636,13 +636,13 @@ class ProcessTestCase(BaseTestCase):
|
||||||
def test_empty_env(self):
|
def test_empty_env(self):
|
||||||
"""Verify that env={} is as empty as possible."""
|
"""Verify that env={} is as empty as possible."""
|
||||||
|
|
||||||
def is_env_var_to_ignore(var_name):
|
def is_env_var_to_ignore(n):
|
||||||
"""Determine if an environment variable is under our control."""
|
"""Determine if an environment variable is under our control."""
|
||||||
# This excludes some __CF_* and VERSIONER_* keys MacOS insists
|
# This excludes some __CF_* and VERSIONER_* keys MacOS insists
|
||||||
# on adding even when the environment in exec is empty.
|
# on adding even when the environment in exec is empty.
|
||||||
# Gentoo sandboxes also force LD_PRELOAD and SANDBOX_* to exist.
|
# Gentoo sandboxes also force LD_PRELOAD and SANDBOX_* to exist.
|
||||||
return ('VERSIONER' in k or '__CF' in k or # MacOS
|
return ('VERSIONER' in n or '__CF' in n or # MacOS
|
||||||
k == 'LD_PRELOAD' or k.startswith('SANDBOX')) # Gentoo
|
n == 'LD_PRELOAD' or n.startswith('SANDBOX')) # Gentoo
|
||||||
|
|
||||||
with subprocess.Popen([sys.executable, "-c",
|
with subprocess.Popen([sys.executable, "-c",
|
||||||
'import os; print(list(os.environ.keys()))'],
|
'import os; print(list(os.environ.keys()))'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue