summaryrefslogtreecommitdiff
path: root/tests/run/internal_cdef_class.pyx
blob: 9c88b0d592aa476ae556b84ad021897a8ed42407 (plain)
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

cimport cython


@cython.internal
cdef class InternalType:
    """
    NOTE: this doesn't fail because it is never tested !
    >>> i = InternalType
    """

cdef class PublicType:
    """
    >>> p = PublicType
    """

def test():
    """
    >>> p,i = test()

    >>> p = PublicType

    >>> i = InternalType         # doctest: +ELLIPSIS
    Traceback (most recent call last):
    NameError: ...name 'InternalType' is not defined
    """
    p = PublicType
    i = InternalType
    return p,i