[Python-checkins] cpython (2.7): Fix test_sysconfig when run from a Python installed under /site (#10086).

eric.araujo python-checkins at python.org
Wed Aug 31 17:35:18 CEST 2011


http://hg.python.org/cpython/rev/4dcbae65df3f
changeset:   72153:4dcbae65df3f
branch:      2.7
parent:      72142:4aa00f465b4f
user:        Éric Araujo <merwok at netwok.org>
date:        Wed Aug 31 16:48:17 2011 +0200
summary:
  Fix test_sysconfig when run from a Python installed under /site (#10086).

Patch by Hallvard B Furuseth.

files:
  Lib/test/test_sysconfig.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -255,14 +255,14 @@
             unlink(link)
 
     def test_user_similar(self):
-        # Issue 8759 : make sure the posix scheme for the users
+        # Issue #8759: make sure the posix scheme for the users
         # is similar to the global posix_prefix one
         base = get_config_var('base')
         user = get_config_var('userbase')
         for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
             global_path = get_path(name, 'posix_prefix')
             user_path = get_path(name, 'posix_user')
-            self.assertEqual(user_path, global_path.replace(base, user))
+            self.assertEqual(user_path, global_path.replace(base, user, 1))
 
     @unittest.skipUnless(sys.platform == "darwin", "test only relevant on MacOSX")
     def test_platform_in_subprocess(self):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list