summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-10-09 04:33:54 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-10-09 04:33:54 (GMT)
commitece7079b54d9a6700558210339df02e4586f698c (patch)
tree58e99d5e2b61db79b1839b1a7c34dcf137594da4 /Lib
parent31b3763fa304038a0f1d8a0be5e4a2b41026f107 (diff)
parent1a1a8a0e31777f8b943b17f5551cac26a5671907 (diff)
downloadcpython-ece7079b54d9a6700558210339df02e4586f698c.zip
cpython-ece7079b54d9a6700558210339df02e4586f698c.tar.gz
cpython-ece7079b54d9a6700558210339df02e4586f698c.tar.bz2
Branch merge
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/tests/test_config_cmd.py4
-rw-r--r--Lib/test/test_sysconfig.py13
2 files changed, 10 insertions, 7 deletions
diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py
index a36a1d5..2cf3886 100644
--- a/Lib/distutils/tests/test_config_cmd.py
+++ b/Lib/distutils/tests/test_config_cmd.py
@@ -44,10 +44,10 @@ class ConfigTestCase(support.LoggingSilencer,
cmd = config(dist)
# simple pattern searches
- match = cmd.search_cpp(pattern='xxx', body='// xxx')
+ match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
self.assertEqual(match, 0)
- match = cmd.search_cpp(pattern='_configtest', body='// xxx')
+ match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
self.assertEqual(match, 1)
def test_finalize_options(self):
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 57d1f55..716fa5e 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -1,9 +1,5 @@
-"""Tests for 'site'.
+"""Tests for sysconfig."""
-Tests assume the initial paths in sys.path once the interpreter has begun
-executing have not been removed.
-
-"""
import unittest
import sys
import os
@@ -259,8 +255,15 @@ class TestSysConfig(unittest.TestCase):
# is similar to the global posix_prefix one
base = get_config_var('base')
user = get_config_var('userbase')
+ # the global scheme mirrors the distinction between prefix and
+ # exec-prefix but not the user scheme, so we have to adapt the paths
+ # before comparing (issue #9100)
+ adapt = sys.prefix != sys.exec_prefix
for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
global_path = get_path(name, 'posix_prefix')
+ if adapt:
+ global_path = global_path.replace(sys.exec_prefix, sys.prefix)
+ base = base.replace(sys.exec_prefix, sys.prefix)
user_path = get_path(name, 'posix_user')
self.assertEqual(user_path, global_path.replace(base, user, 1))