Commit d9d5ebb9 authored by Stefan Behnel's avatar Stefan Behnel

new test for auto_cpdef with closure functions

parent e8cc17ab
......@@ -19,6 +19,7 @@ for_from_pyvar_loop_T601
decorators_T593
temp_sideeffects_T654
class_scope_T671
auto_cpdef_closures
# CPython regression tests that don't current work:
pyregr.test_threadsignals
......
# cython: auto_cpdef=True
# mode:run
# tag: directive,auto_cpdef,closures
def closure_func(x):
"""
>>> c = closure_func(2)
>>> c()
2
"""
def c():
return x
return c
def generator_func():
"""
>>> for i in generator_func(): print(i)
1
2
"""
yield 1
yield 2
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