[Python-checkins] r72500 - in python/trunk: Lib/distutils/tests/test_util.py Misc/NEWS
tarek.ziade
python-checkins at python.org
Sat May 9 12:06:01 CEST 2009
Author: tarek.ziade
Date: Sat May 9 12:06:00 2009
New Revision: 72500
Log:
#5976: fixed distutils test_check_environ
Modified:
python/trunk/Lib/distutils/tests/test_util.py
python/trunk/Misc/NEWS
Modified: python/trunk/Lib/distutils/tests/test_util.py
==============================================================================
--- python/trunk/Lib/distutils/tests/test_util.py (original)
+++ python/trunk/Lib/distutils/tests/test_util.py Sat May 9 12:06:00 2009
@@ -214,12 +214,17 @@
# posix without HOME
if os.name == 'posix': # this test won't run on windows
- os.environ = {}
- check_environ()
-
- import pwd
- self.assertEquals(os.environ['HOME'],
- pwd.getpwuid(os.getuid())[5])
+ old_home = os.environ.get('HOME')
+ try:
+ check_environ()
+ import pwd
+ self.assertEquals(os.environ['HOME'],
+ pwd.getpwuid(os.getuid())[5])
+ finally:
+ if old_home is not None:
+ os.environ['HOME'] = old_home
+ else:
+ del os.environ['HOME']
else:
check_environ()
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Sat May 9 12:06:00 2009
@@ -285,6 +285,8 @@
Library
-------
+- Issue #5976: Fixed Distutils test_check_environ.
+
- Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU
ld is used. Original patch by Floris Bruynooghe.
More information about the Python-checkins
mailing list