summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/try_continue.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-02-01 16:07:21 +0000
committerDamien George <damien.p.george@gmail.com>2016-02-01 16:07:21 +0000
commit93bb7dffd2a655dd8522114ed014077fb6b7ada7 (patch)
tree12212dce2cfd5904299a1fa5d4b61ca70036e560 /tests/basics/try_continue.py
parent9e677114e4aba8fdb417350a87ce1af33cef127f (diff)
downloadmicropython-93bb7dffd2a655dd8522114ed014077fb6b7ada7.tar.gz
micropython-93bb7dffd2a655dd8522114ed014077fb6b7ada7.zip
py/vm: Fix popping of exception block in UNWIND_JUMP opcode.
Fixes issue #1812.
Diffstat (limited to 'tests/basics/try_continue.py')
-rw-r--r--tests/basics/try_continue.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/try_continue.py b/tests/basics/try_continue.py
new file mode 100644
index 0000000000..4a199b8a38
--- /dev/null
+++ b/tests/basics/try_continue.py
@@ -0,0 +1,13 @@
+# test continue within exception handler
+
+def f():
+ lst = [1, 2, 3]
+ for x in lst:
+ print('a', x)
+ try:
+ if x == 2:
+ raise Exception
+ except Exception:
+ continue
+ print('b', x)
+f()