Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
330b33b9
Commit
330b33b9
authored
Oct 08, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test_sysconfig when prefix != exec-prefix (#9100).
Reported by Zsolt Cserna.
parent
1f351574
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Lib/test/test_sysconfig.py
Lib/test/test_sysconfig.py
+8
-5
No files found.
Lib/test/test_sysconfig.py
View file @
330b33b9
"""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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment