mirror of
https://github.com/python/cpython.git
synced 2025-10-12 09:53:19 +00:00
#5976: fixed distutils test_check_environ
This commit is contained in:
parent
e2be83def8
commit
812d77152e
2 changed files with 13 additions and 6 deletions
|
@ -214,12 +214,17 @@ class utilTestCase(unittest.TestCase):
|
||||||
|
|
||||||
# posix without HOME
|
# posix without HOME
|
||||||
if os.name == 'posix': # this test won't run on windows
|
if os.name == 'posix': # this test won't run on windows
|
||||||
os.environ = {}
|
old_home = os.environ.get('HOME')
|
||||||
check_environ()
|
try:
|
||||||
|
check_environ()
|
||||||
import pwd
|
import pwd
|
||||||
self.assertEquals(os.environ['HOME'],
|
self.assertEquals(os.environ['HOME'],
|
||||||
pwd.getpwuid(os.getuid())[5])
|
pwd.getpwuid(os.getuid())[5])
|
||||||
|
finally:
|
||||||
|
if old_home is not None:
|
||||||
|
os.environ['HOME'] = old_home
|
||||||
|
else:
|
||||||
|
del os.environ['HOME']
|
||||||
else:
|
else:
|
||||||
check_environ()
|
check_environ()
|
||||||
|
|
||||||
|
|
|
@ -285,6 +285,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #5976: Fixed Distutils test_check_environ.
|
||||||
|
|
||||||
- Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU
|
- Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU
|
||||||
ld is used. Original patch by Floris Bruynooghe.
|
ld is used. Original patch by Floris Bruynooghe.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue