summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-01-03 17:57:29 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-01-03 17:57:29 (GMT)
commit513c4f8fdd663fc4e85b6da4fdbaf466c137d0dd (patch)
treee2f3940fb4da7b1da49546e4666a03a54fb5f81c /Lib
parent70645a47e5b278c15c619554ad341675288497cb (diff)
downloadcpython-513c4f8fdd663fc4e85b6da4fdbaf466c137d0dd.zip
cpython-513c4f8fdd663fc4e85b6da4fdbaf466c137d0dd.tar.gz
cpython-513c4f8fdd663fc4e85b6da4fdbaf466c137d0dd.tar.bz2
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. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_site.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 69349e1..1988ef3 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -165,13 +165,17 @@ 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, "%r is not in sys.path (sys.exit returned %r)"
% (usersite, rc))
+ 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()