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
59bd6923
Commit
59bd6923
authored
Jun 06, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sys.flags sequence behavior and add a test case.
parent
64eb18db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_sys.py
Lib/test/test_sys.py
+2
-1
Python/sysmodule.c
Python/sysmodule.c
+2
-2
No files found.
Lib/test/test_sys.py
View file @
59bd6923
...
@@ -324,12 +324,13 @@ class SysModuleTest(unittest.TestCase):
...
@@ -324,12 +324,13 @@ class SysModuleTest(unittest.TestCase):
self
.
failUnless
(
sys
.
flags
)
self
.
failUnless
(
sys
.
flags
)
attrs
=
(
"debug"
,
"division_warning"
,
attrs
=
(
"debug"
,
"division_warning"
,
"inspect"
,
"interactive"
,
"optimize"
,
"dont_write_bytecode"
,
"inspect"
,
"interactive"
,
"optimize"
,
"dont_write_bytecode"
,
"no_site"
,
"ignore_environment"
,
"verbose"
,
"no_
user_site"
,
"no_
site"
,
"ignore_environment"
,
"verbose"
,
"bytes_warning"
)
"bytes_warning"
)
for
attr
in
attrs
:
for
attr
in
attrs
:
self
.
assert_
(
hasattr
(
sys
.
flags
,
attr
),
attr
)
self
.
assert_
(
hasattr
(
sys
.
flags
,
attr
),
attr
)
self
.
assertEqual
(
type
(
getattr
(
sys
.
flags
,
attr
)),
int
,
attr
)
self
.
assertEqual
(
type
(
getattr
(
sys
.
flags
,
attr
)),
int
,
attr
)
self
.
assert_
(
repr
(
sys
.
flags
))
self
.
assert_
(
repr
(
sys
.
flags
))
self
.
assertEqual
(
len
(
sys
.
flags
),
len
(
attrs
))
def
test_clear_type_cache
(
self
):
def
test_clear_type_cache
(
self
):
sys
.
_clear_type_cache
()
sys
.
_clear_type_cache
()
...
...
Python/sysmodule.c
View file @
59bd6923
...
@@ -1150,9 +1150,9 @@ static PyStructSequence_Desc flags_desc = {
...
@@ -1150,9 +1150,9 @@ static PyStructSequence_Desc flags_desc = {
flags__doc__
,
/* doc */
flags__doc__
,
/* doc */
flags_fields
,
/* fields */
flags_fields
,
/* fields */
#ifdef RISCOS
#ifdef RISCOS
1
1
1
2
#else
#else
1
0
1
1
#endif
#endif
};
};
...
...
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