Commit 193388a3 authored by Stefan Behnel's avatar Stefan Behnel

extended test case

parent 0a2e5351
...@@ -27,3 +27,13 @@ def complex_cstruct_assign(): ...@@ -27,3 +27,13 @@ def complex_cstruct_assign():
cval = &c.cval cval = &c.cval
cval.real, cval.imag = 10, 20 cval.real, cval.imag = 10, 20
return (c.real, c.imag) return (c.real, c.imag)
def complex_coercion():
"""
>>> complex_coercion()
(1.0, 2.0, 1.0, 2.0)
"""
cdef complex py_c = 1+2j
cdef double complex c_c = py_c
cdef object py = c_c
return (c_c.real, c_c.imag, py.real, py.imag)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment