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
c59a49dd
Commit
c59a49dd
authored
Jun 26, 2014
by
Zachary Ware
Browse files
Options
Browse Files
Download
Plain Diff
Issue #21829: Merge with 3.4
parents
0c43ed87
7180c793
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
Lib/ctypes/test/test_values.py
Lib/ctypes/test/test_values.py
+3
-12
No files found.
Lib/ctypes/test/test_values.py
View file @
c59a49dd
...
...
@@ -33,20 +33,11 @@ class Win_ValuesTestCase(unittest.TestCase):
"""This test only works when python itself is a dll/shared library"""
def
test_optimizeflag
(
self
):
# This test accesses the Py_OptimizeFlag intger, which is
# exported by the Python dll
.
# This test accesses the Py_OptimizeFlag int
e
ger, which is
# exported by the Python dll
and should match the sys.flags value
# It's value is set depending on the -O and -OO flags:
# if not given, it is 0 and __debug__ is 1.
# If -O is given, the flag is 1, for -OO it is 2.
# docstrings are also removed in the latter case.
opt
=
c_int
.
in_dll
(
pythonapi
,
"Py_OptimizeFlag"
).
value
if
__debug__
:
self
.
assertEqual
(
opt
,
0
)
elif
ValuesTestCase
.
__doc__
is
not
None
:
self
.
assertEqual
(
opt
,
1
)
else
:
self
.
assertEqual
(
opt
,
2
)
self
.
assertEqual
(
opt
,
sys
.
flags
.
optimize
)
def
test_frozentable
(
self
):
# Python exports a PyImport_FrozenModules symbol. This is a
...
...
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