diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-09-11 15:33:25 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-09-11 15:33:25 +1000 |
| commit | f2de9d60f7dbe91d9c92ebc8df3136403d9b7938 (patch) | |
| tree | 99410823b06b09266168f084f058ff6dbd4c60d9 /tests/basics/try_finally1.py | |
| parent | 67ee4e24010322153d04d8f684927b6332d4cd90 (diff) | |
py/emitnative: Fix try-finally in outer scope, so finally is cancelled.
Diffstat (limited to 'tests/basics/try_finally1.py')
| -rw-r--r-- | tests/basics/try_finally1.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/try_finally1.py b/tests/basics/try_finally1.py index 1e821deb6..67ebe0b59 100644 --- a/tests/basics/try_finally1.py +++ b/tests/basics/try_finally1.py @@ -82,3 +82,15 @@ finally: print("except2") print("finally1") print() + +# case where exception is raised after a finally has finished (tests that the finally doesn't run again) +def func(): + try: + print("try") + finally: + print("finally") + foo +try: + func() +except: + print("except") |
