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_tempfile.py b/Lib/test/test_tempfile.py
index 2b46c46..8b883b0 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -153,7 +153,7 @@
for envname in 'TMPDIR', 'TEMP', 'TMP':
dirname = os.getenv(envname)
if not dirname:
- env.set(envname, os.path.abspath(envname))
+ env[envname] = os.path.abspath(envname)
cand = tempfile._candidate_tempdir_list()