summaryrefslogtreecommitdiff
path: root/tests/run/complex_numbers_T305_long_double.pyx
blob: 9bc1e73fb9faf5a9be87697bf733d495df4561c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# ticket: t305

cimport cython

def test_object_conversion(o):
    """
    >>> test_object_conversion(2)
    (2+0j)
    >>> test_object_conversion(2j - 0.5)
    (-0.5+2j)
    """
    cdef long double complex a = o
    return a