mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Make test.test_support.EnvironmentVarGuard behave like a dictionary.
All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block.
This commit is contained in:
parent
ca87fa5a5b
commit
6733bed57e
11 changed files with 72 additions and 67 deletions
|
|
@ -103,7 +103,7 @@ class ProxyTests(unittest.TestCase):
|
|||
# Delete all proxy related env vars
|
||||
for k, v in os.environ.iteritems():
|
||||
if 'proxy' in k.lower():
|
||||
env.unset(k)
|
||||
del env[k]
|
||||
|
||||
def tearDown(self):
|
||||
# Restore all proxy related env vars
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue