[Python-checkins] r87694 - in python/branches/release27-maint: Lib/test/test_site.py
eric.araujo
python-checkins at python.org
Mon Jan 3 18:57:30 CET 2011
Author: eric.araujo
Date: Mon Jan 3 18:57:29 2011
New Revision: 87694
Log:
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.
........
Modified:
python/branches/release27-maint/ (props changed)
python/branches/release27-maint/Lib/test/test_site.py
Modified: python/branches/release27-maint/Lib/test/test_site.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_site.py (original)
+++ python/branches/release27-maint/Lib/test/test_site.py Mon Jan 3 18:57:29 2011
@@ -165,13 +165,17 @@
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()
More information about the Python-checkins
mailing list