Debian Codegraph @

extra_tests/ctypes_tests/test_parameters.py

raw symbols SCIP
1 from ctypes import POINTER, c_void_p
2
3 def test_pointer_subclasses():
4 Void_pp = POINTER(c_void_p)
5 class My_void_p(c_void_p):
6 pass
7
8 My_void_pp = POINTER(My_void_p)
9 o = My_void_pp()
10
11 assert Void_pp.from_param(o) is o
12
13
14 def test_multiple_signature(dll):
15 # when .argtypes is not set, calling a function with a certain
16 # set of parameters should not prevent another call with
17 # another set.
18 func = dll._testfunc_p_p
19
20 # This is call has too many arguments
21 assert func(None, 1) == 0
22
23 # This one is normal
24 assert func(None) == 0