File: test_ctypes.py

package info (click to toggle)
python-cffi 0.8.6-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 1,444 kB
  • sloc: python: 12,599; ansic: 6,343; asm: 116; makefile: 84; sh: 24
file content (37 lines) | stat: -rw-r--r-- 1,315 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import py, sys
from testing import backend_tests
from cffi.backend_ctypes import CTypesBackend


class TestCTypes(backend_tests.BackendTests):
    # for individual tests see
    # ====> backend_tests.py
    
    Backend = CTypesBackend
    TypeRepr = "<class 'ffi.CData<%s>'>"

    def test_array_of_func_ptr(self):
        py.test.skip("ctypes backend: not supported: "
                     "initializers for function pointers")

    def test_structptr_argument(self):
        py.test.skip("ctypes backend: not supported: passing a list "
                     "for a pointer argument")

    def test_array_argument_as_list(self):
        py.test.skip("ctypes backend: not supported: passing a list "
                     "for a pointer argument")

    def test_cast_to_array_type(self):
        py.test.skip("ctypes backend: not supported: casting to array")

    def test_nested_anonymous_struct(self):
        py.test.skip("ctypes backend: not supported: nested anonymous struct")

    def test_nested_anonymous_union(self):
        py.test.skip("ctypes backend: not supported: nested anonymous union")

    def test_CData_CType_2(self):
        if sys.version_info >= (3,):
            py.test.skip("ctypes backend: not supported in Python 3: CType")
        backend_tests.BackendTests.test_CData_CType_2(self)