Commit a6117482 authored by Vitja Makarov's avatar Vitja Makarov

Add tests for ticket #674

parent bbc4c9e2
...@@ -18,6 +18,7 @@ temp_sideeffects_T654 ...@@ -18,6 +18,7 @@ temp_sideeffects_T654
class_scope_T671 class_scope_T671
slice2_T636 slice2_T636
builtin_subtype_methods_T653 builtin_subtype_methods_T653
default_args_T674
# CPython regression tests that don't current work: # CPython regression tests that don't current work:
pyregr.test_threadsignals pyregr.test_threadsignals
......
# mode: run
# ticket: 674
def test_inner(a):
"""
>>> a = test_inner(1)
>>> b = test_inner(2)
>>> a()
1
>>> b()
2
"""
def inner(b=a):
return b
return inner
def test_lambda(n):
"""
>>> [f() for f in test_lambda(3)]
[0, 1, 2]
"""
return [lambda v=i: v for i in range(n)]
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