Commit 3f684dfe authored by Stefan Behnel's avatar Stefan Behnel

extend try-finally smoke test with some arbitrary syntax constructs

parent 5a40d545
......@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj):
from contextlib import contextmanager
with contextmanager(lambda: (yield 1))() as y:
assert y == 1
a = 1
with nogil:
if i > 0:
with gil:
assert obj.method
a = 2
# FIXME: prevent deep-copying inner functions
#def closure(l):
# assert l == lobj
#closure()
assert name[0] in string.ascii_letters
string.Template("-- huhu $name --").substitute(**{'name': '(%s)' % name})
if a:
a = 3
del l[0], lobj[0]
assert all(i == 3 for i in l), l
return 99
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