Commit 8faf60dd authored by Tarek Ziadé's avatar Tarek Ziadé

Merged revisions 72500 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72500 | tarek.ziade | 2009-05-09 12:06:00 +0200 (Sat, 09 May 2009) | 1 line

  #5976: fixed distutils test_check_environ
........
parent 9e299d5f
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment