diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-09 06:55:04 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-09 06:55:04 (GMT) |
commit | 9255464dfb3a444eb5b7ea0a4e7c440d49a712be (patch) | |
tree | 9cededacec855c581a318f707d9d73480c14feeb /Lib/test | |
parent | eaf139b3fc22be22e2c23d84d65a5c344df684a2 (diff) | |
parent | a29e4f64c1dfeb4ca1cf9f4c9636cb4528b2fd8c (diff) | |
download | cpython-9255464dfb3a444eb5b7ea0a4e7c440d49a712be.zip cpython-9255464dfb3a444eb5b7ea0a4e7c440d49a712be.tar.gz cpython-9255464dfb3a444eb5b7ea0a4e7c440d49a712be.tar.bz2 |
Branch merge
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_sysconfig.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 08b40a1..8058d0e 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -3,9 +3,9 @@ import sys import os import subprocess import shutil -from copy import copy, deepcopy +from copy import copy -from test.support import (run_unittest, TESTFN, unlink, get_attribute, +from test.support import (run_unittest, TESTFN, unlink, captured_stdout, skip_unless_symlink) import sysconfig @@ -256,8 +256,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)) |