mirror of
https://github.com/python/cpython.git
synced 2025-08-17 23:31:09 +00:00
[3.13] gh-131277: allow EnvironmentVarGuard to unset more than one environment variable at once (GH-131280) (#131409)
(cherry picked from commit 3185e3115c
)
---------
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
25ae2045a8
commit
85c20374c0
10 changed files with 27 additions and 36 deletions
|
@ -20,12 +20,13 @@ class Test_OSXSupport(unittest.TestCase):
|
|||
self.prog_name = 'bogus_program_xxxx'
|
||||
self.temp_path_dir = os.path.abspath(os.getcwd())
|
||||
self.env = self.enterContext(os_helper.EnvironmentVarGuard())
|
||||
for cv in ('CFLAGS', 'LDFLAGS', 'CPPFLAGS',
|
||||
'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'CC',
|
||||
'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
|
||||
'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS'):
|
||||
if cv in self.env:
|
||||
self.env.unset(cv)
|
||||
|
||||
self.env.unset(
|
||||
'CFLAGS', 'LDFLAGS', 'CPPFLAGS',
|
||||
'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'CC',
|
||||
'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
|
||||
'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS'
|
||||
)
|
||||
|
||||
def add_expected_saved_initial_values(self, config_vars, expected_vars):
|
||||
# Ensure that the initial values for all modified config vars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue