summaryrefslogtreecommitdiff
path: root/tests/functional/c/continue_in_finally.py
blob: dcdac8f8d1758c9ceb5ca1ee26a2e28baa5c44ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Test that `continue` is caught when met inside a `finally` clause."""

# pylint: disable=missing-docstring, lost-exception, broad-except

while True:
    try:
        pass
    finally:
        continue # [continue-in-finally]

while True:
    try:
        pass
    finally:
        break

while True:
    try:
        pass
    except Exception:
        pass
    else:
        continue