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.
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 8b687cf7..ffc2f31 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -103,7 +103,7 @@
# 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