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
e81b0289
Commit
e81b0289
authored
Feb 02, 2010
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sysconfig.get_scheme_names now returns a sorted tuple
parent
cc118178
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Lib/sysconfig.py
Lib/sysconfig.py
+3
-1
Lib/test/test_sysconfig.py
Lib/test/test_sysconfig.py
+7
-1
No files found.
Lib/sysconfig.py
View file @
e81b0289
...
...
@@ -343,7 +343,9 @@ def get_config_h_filename():
def
get_scheme_names
():
"""Returns a tuple containing the schemes names."""
return
_INSTALL_SCHEMES
.
keys
()
schemes
=
_INSTALL_SCHEMES
.
keys
()
schemes
.
sort
()
return
tuple
(
schemes
)
def
get_path_names
():
"""Returns a tuple containing the paths names."""
...
...
Lib/test/test_sysconfig.py
View file @
e81b0289
...
...
@@ -15,7 +15,8 @@ from test.test_support import run_unittest, TESTFN
import
sysconfig
from
sysconfig
import
(
get_paths
,
get_platform
,
get_config_vars
,
get_path
,
get_path_names
,
_INSTALL_SCHEMES
,
_get_default_scheme
,
_expand_vars
)
_get_default_scheme
,
_expand_vars
,
get_scheme_names
)
class
TestSysConfig
(
unittest
.
TestCase
):
...
...
@@ -232,6 +233,11 @@ class TestSysConfig(unittest.TestCase):
config_h
=
sysconfig
.
get_config_h_filename
()
self
.
assertTrue
(
os
.
path
.
isfile
(
config_h
),
config_h
)
def
test_get_scheme_names
(
self
):
wanted
=
(
'nt'
,
'nt_user'
,
'os2'
,
'os2_home'
,
'posix_home'
,
'posix_prefix'
,
'posix_user'
)
self
.
assertEquals
(
get_scheme_names
(),
wanted
)
def
test_main
():
run_unittest
(
TestSysConfig
)
...
...
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