[Python-checkins] r75465 - in python/trunk/Lib/test: test_httpservers.py test_support.py
nick.coghlan
python-checkins at python.org
Sat Oct 17 17:45:53 CEST 2009
Author: nick.coghlan
Date: Sat Oct 17 17:45:52 2009
New Revision: 75465
Log:
Move restoration of the os.environ object into the context manager where it belongs
Modified:
python/trunk/Lib/test/test_httpservers.py
python/trunk/Lib/test/test_support.py
Modified: python/trunk/Lib/test/test_httpservers.py
==============================================================================
--- python/trunk/Lib/test/test_httpservers.py (original)
+++ python/trunk/Lib/test/test_httpservers.py Sat Oct 17 17:45:52 2009
@@ -60,7 +60,6 @@
self.lock.release()
self.thread.stop()
os.environ.__exit__()
- os.environ = os.environ._environ
def request(self, uri, method='GET', body=None, headers={}):
self.connection = httplib.HTTPConnection('localhost', self.PORT)
Modified: python/trunk/Lib/test/test_support.py
==============================================================================
--- python/trunk/Lib/test/test_support.py (original)
+++ python/trunk/Lib/test/test_support.py Sat Oct 17 17:45:52 2009
@@ -576,6 +576,7 @@
del self._environ[k]
else:
self._environ[k] = v
+ os.environ = self._environ
class DirsOnSysPath(object):
More information about the Python-checkins
mailing list