mirror of
https://github.com/python/cpython.git
synced 2025-09-10 10:47:34 +00:00
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>
This commit is contained in:
parent
9558d22ac3
commit
3185e3115c
15 changed files with 38 additions and 45 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue