aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test__osx_support.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test__osx_support.py')
-rw-r--r--Lib/test/test__osx_support.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test__osx_support.py b/Lib/test/test__osx_support.py
index 907ae27d529..4a14cb35213 100644
--- a/Lib/test/test__osx_support.py
+++ b/Lib/test/test__osx_support.py
@@ -19,8 +19,7 @@ class Test_OSXSupport(unittest.TestCase):
self.maxDiff = None
self.prog_name = 'bogus_program_xxxx'
self.temp_path_dir = os.path.abspath(os.getcwd())
- self.env = os_helper.EnvironmentVarGuard()
- self.addCleanup(self.env.__exit__)
+ self.env = self.enterContext(os_helper.EnvironmentVarGuard())
for cv in ('CFLAGS', 'LDFLAGS', 'CPPFLAGS',
'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'CC',
'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',