Add additional testcase for finally/return.

This commit is contained in:
Paul Sokolovsky 2014-02-06 03:20:56 +02:00
parent e09ffa1400
commit 3c95ba7e4e
1 changed files with 16 additions and 0 deletions

View File

@ -5,3 +5,19 @@ def func1():
print("finally 1")
print(func1())
def func2():
try:
return "it worked"
finally:
print("finally 2")
def func3():
try:
s = func2()
return s + ", did this work?"
finally:
print("finally 3")
print(func3())