mirror of
https://github.com/python/cpython.git
synced 2025-12-10 02:50:09 +00:00
Fix test_site for systems without unsetenv. Reported by Zsolt Cserna.
This commit is contained in:
parent
32e1d8340c
commit
63ebe1c309
1 changed files with 6 additions and 2 deletions
|
|
@ -161,12 +161,16 @@ class HelperFunctionsTests(unittest.TestCase):
|
|||
usersite = site.USER_SITE
|
||||
self.assertIn(usersite, sys.path)
|
||||
|
||||
env = os.environ.copy()
|
||||
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)
|
||||
|
||||
env = os.environ.copy()
|
||||
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)
|
||||
|
||||
env = os.environ.copy()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue