#5976: fixed distutils test_check_environ

This commit is contained in:
Tarek Ziadé 2009-05-09 10:06:00 +00:00
parent e2be83def8
commit 812d77152e
2 changed files with 13 additions and 6 deletions

View File

@ -214,12 +214,17 @@ class utilTestCase(unittest.TestCase):
# 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()

View File

@ -285,6 +285,8 @@ Core and Builtins
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.