1# mode: run
2
3cdef object executable, version_info
4cdef long hexversion
5
6ctypedef struct MyStruct:
7    int x, y, z
8
9# conversion code for this struct will be generated but not used
10# (there used to be a problem getting Cython conversion code generated here)
11cdef MyStruct _no_such_name_ = MyStruct(1, 2, 3)
12
13from libc.math cimport M_PI
14
15# Danger ahead!
16from sys import *
17
18
19def test_cdefed_objects():
20    """
21    >>> ex, vi = test_cdefed_objects()
22    >>> assert ex is not None
23    >>> assert vi is not None
24    """
25    return executable, version_info
26
27
28def test_cdefed_cvalues():
29    """
30    >>> hexver = test_cdefed_cvalues()
31    >>> assert hexver is not None
32    >>> assert hexver > 0x02020000
33    """
34    return hexversion
35
36
37def test_non_cdefed_names():
38    """
39    >>> mod, pth = test_non_cdefed_names()
40    >>> assert mod is not None
41    >>> assert pth is not None
42    """
43    return modules, path
44
45
46def test_cimported_pi():
47    """
48    >>> pi = test_cimported_pi()
49    >>> 3.14 < pi < 3.15
50    True
51    """
52    return M_PI
53