]> granicus.if.org Git - python/commitdiff
Merged revisions 71878 via svnmerge from
authorTarek Ziadé <ziade.tarek@gmail.com>
Sat, 25 Apr 2009 12:39:56 +0000 (12:39 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Sat, 25 Apr 2009 12:39:56 +0000 (12:39 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71878 | tarek.ziade | 2009-04-25 14:38:08 +0200 (Sat, 25 Apr 2009) | 1 line

  Issue #4951: Fixed failure in test_httpservers
........

Lib/distutils/tests/test_util.py
Misc/NEWS

index 29be0cfd2dca18403c733191c7cafb8de9142135..348933e901c864aabd567913e8bb8ff0bce8515b 100644 (file)
@@ -29,7 +29,7 @@ class utilTestCase(unittest.TestCase):
         self.platform = sys.platform
         self.version = sys.version
         self.sep = os.sep
-        self.environ = os.environ
+        self.environ = dict(os.environ)
         self.join = os.path.join
         self.isabs = os.path.isabs
         self.splitdrive = os.path.splitdrive
@@ -51,7 +51,10 @@ class utilTestCase(unittest.TestCase):
         sys.platform = self.platform
         sys.version = self.version
         os.sep = self.sep
-        os.environ = self.environ
+        for k, v in self.environ.items():
+            os.environ[k] = v
+        for k in set(os.environ) - set(self.environ):
+            del os.environ[k]
         os.path.join = self.join
         os.path.isabs = self.isabs
         os.path.splitdrive = self.splitdrive
index c3a965af702f443b3cb86b6e80c567da253f045d..e647965cfdd2bc69d5040e7d2fed18f16de3f0f4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -437,6 +437,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #4951: Fixed failure in test_httpservers.
+
 - Issue #5795: Fixed test_distutils failure on Debian ppc.
 
 - Issue #5607: fixed Distutils test_get_platform for Mac OS X fat binaries.