summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_site.py
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-03-16 13:09:33 (GMT)
committerGitHub <noreply@github.com>2025-03-16 13:09:33 (GMT)
commit3185e3115c918ec189e16cf9f5b51a13a0146556 (patch)
tree4a773847ee275359ae58832afea1071858e539af /Lib/test/test_site.py
parent9558d22ac308c102e4f843541eead2022050225e (diff)
downloadcpython-3185e3115c918ec189e16cf9f5b51a13a0146556.zip
cpython-3185e3115c918ec189e16cf9f5b51a13a0146556.tar.gz
cpython-3185e3115c918ec189e16cf9f5b51a13a0146556.tar.bz2
gh-131277: allow `EnvironmentVarGuard` to unset more than one environment variable at once (#131280)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r--Lib/test/test_site.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 035913c..16cf257 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -355,9 +355,7 @@ class HelperFunctionsTests(unittest.TestCase):
with EnvironmentVarGuard() as environ, \
mock.patch('os.path.expanduser', lambda path: path):
-
- del environ['PYTHONUSERBASE']
- del environ['APPDATA']
+ environ.unset('PYTHONUSERBASE', 'APPDATA')
user_base = site.getuserbase()
self.assertTrue(user_base.startswith('~' + os.sep),