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
cecb75e4
Commit
cecb75e4
authored
Sep 29, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Merge test cleanup from 3.5 into 3.6
parents
ee8a4f57
611a1bed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
24 deletions
+1
-24
Lib/ctypes/test/test_find.py
Lib/ctypes/test/test_find.py
+1
-24
No files found.
Lib/ctypes/test/test_find.py
View file @
cecb75e4
import
unittest
import
os
,
os
.
path
import
os.path
import
sys
import
test.support
from
ctypes
import
*
...
...
@@ -112,28 +112,5 @@ class LibPathFindTest(unittest.TestCase):
self
.
assertEqual
(
find_library
(
libname
),
'lib%s.so'
%
libname
)
# On platforms where the default shared library suffix is '.so',
# at least some libraries can be loaded as attributes of the cdll
# object, since ctypes now tries loading the lib again
# with '.so' appended of the first try fails.
#
# Won't work for libc, unfortunately. OTOH, it isn't
# needed for libc since this is already mapped into the current
# process (?)
#
# On MAC OSX, it won't work either, because dlopen() needs a full path,
# and the default suffix is either none or '.dylib'.
@
unittest
.
skip
(
'test disabled'
)
@
unittest
.
skipUnless
(
os
.
name
==
"posix"
and
sys
.
platform
!=
"darwin"
,
'test not suitable for this platform'
)
class
LoadLibs
(
unittest
.
TestCase
):
def
test_libm
(
self
):
import
math
libm
=
cdll
.
libm
sqrt
=
libm
.
sqrt
sqrt
.
argtypes
=
(
c_double
,)
sqrt
.
restype
=
c_double
self
.
assertEqual
(
sqrt
(
2
),
math
.
sqrt
(
2
))
if
__name__
==
"__main__"
:
unittest
.
main
()
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