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
a4b091e1
Commit
a4b091e1
authored
Jun 23, 2017
by
Victor Stinner
Committed by
GitHub
Jun 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-30604: Skip CoExtra tests if ctypes is missing (#2356)
parent
c8d6ab2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Lib/test/test_code.py
Lib/test/test_code.py
+6
-3
No files found.
Lib/test/test_code.py
View file @
a4b091e1
...
...
@@ -106,6 +106,10 @@ import sys
import
threading
import
unittest
import
weakref
try
:
import
ctypes
except
ImportError
:
ctypes
=
None
from
test.support
import
(
run_doctest
,
run_unittest
,
cpython_only
,
check_impl_detail
)
...
...
@@ -214,8 +218,7 @@ class CodeWeakRefTest(unittest.TestCase):
self
.
assertTrue
(
self
.
called
)
if
check_impl_detail
(
cpython
=
True
):
import
ctypes
if
check_impl_detail
(
cpython
=
True
)
and
ctypes
is
not
None
:
py
=
ctypes
.
pythonapi
freefunc
=
ctypes
.
CFUNCTYPE
(
None
,
ctypes
.
c_voidp
)
...
...
@@ -311,7 +314,7 @@ def test_main(verbose=None):
from
test
import
test_code
run_doctest
(
test_code
,
verbose
)
tests
=
[
CodeTest
,
CodeConstsTest
,
CodeWeakRefTest
]
if
check_impl_detail
(
cpython
=
True
):
if
check_impl_detail
(
cpython
=
True
)
and
ctypes
is
not
None
:
tests
.
append
(
CoExtra
)
run_unittest
(
*
tests
)
...
...
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