summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2011-10-08 03:54:58 +0200
committer?ric Araujo <merwok@netwok.org>2011-10-08 03:54:58 +0200
commit2805730a0970403738d586ce5e7028172c1983fd (patch)
tree03896529d17fd0709ffc392acd69d6ac0c8c3fc9
parent1731b8b24f8e66fa031802098f360d85d6f192fa (diff)
parented9fe83133b15a35776999ba2e500062cd706f81 (diff)
downloaddisutils2-2805730a0970403738d586ce5e7028172c1983fd.tar.gz
Merge default
-rw-r--r--distutils2/_backport/tests/test_sysconfig.py8
-rw-r--r--distutils2/tests/test_command_config.py4
2 files changed, 9 insertions, 3 deletions
diff --git a/distutils2/_backport/tests/test_sysconfig.py b/distutils2/_backport/tests/test_sysconfig.py
index 1126afe..937396c 100644
--- a/distutils2/_backport/tests/test_sysconfig.py
+++ b/distutils2/_backport/tests/test_sysconfig.py
@@ -3,7 +3,6 @@ import sys
import subprocess
import shutil
from copy import copy
-from configparser import RawConfigParser
from io import StringIO
from distutils2._backport import sysconfig
@@ -260,8 +259,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))
diff --git a/distutils2/tests/test_command_config.py b/distutils2/tests/test_command_config.py
index 91058c7..97304a6 100644
--- a/distutils2/tests/test_command_config.py
+++ b/distutils2/tests/test_command_config.py
@@ -29,10 +29,10 @@ class ConfigTestCase(support.LoggingCatcher,
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):