mirror of https://github.com/python/cpython
Merged revisions 87691 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87691 | eric.araujo | 2011-01-03 18:51:11 +0100 (lun., 03 janv. 2011) | 2 lines Fix test_site for systems without unsetenv. Reported by Zsolt Cserna. ........
This commit is contained in:
parent
622eb174d2
commit
904fe042f3
|
@ -154,12 +154,16 @@ class HelperFunctionsTests(unittest.TestCase):
|
||||||
usersite = site.USER_SITE
|
usersite = site.USER_SITE
|
||||||
self.assertTrue(usersite in sys.path)
|
self.assertTrue(usersite in sys.path)
|
||||||
|
|
||||||
|
env = os.environ.copy()
|
||||||
rc = subprocess.call([sys.executable, '-c',
|
rc = subprocess.call([sys.executable, '-c',
|
||||||
'import sys; sys.exit(%r in sys.path)' % usersite])
|
'import sys; sys.exit(%r in sys.path)' % usersite],
|
||||||
|
env=env)
|
||||||
self.assertEqual(rc, 1)
|
self.assertEqual(rc, 1)
|
||||||
|
|
||||||
|
env = os.environ.copy()
|
||||||
rc = subprocess.call([sys.executable, '-s', '-c',
|
rc = subprocess.call([sys.executable, '-s', '-c',
|
||||||
'import sys; sys.exit(%r in sys.path)' % usersite])
|
'import sys; sys.exit(%r in sys.path)' % usersite],
|
||||||
|
env=env)
|
||||||
self.assertEqual(rc, 0)
|
self.assertEqual(rc, 0)
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
|
|
Loading…
Reference in New Issue