diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-06 07:35:11 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-06 07:35:11 -0500 |
commit | cb33e6c3a41d48a37bebee3e8b3421ab35ab0ba5 (patch) | |
tree | 252d7ea827339594f542c0ee14deac77cfefcb5d /tests/test_arcs.py | |
parent | 8f9b4f9d596ef4a5c0d26b4e54acfcd0558ece39 (diff) | |
download | python-coveragepy-git-cb33e6c3a41d48a37bebee3e8b3421ab35ab0ba5.tar.gz |
Test continue/finally
--HG--
branch : ast-branch
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 60fdea37..bb811c01 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -617,6 +617,26 @@ class ExceptionArcTest(CoverageTest): arcz_missing="3D BC CD", ) + def test_continue_through_finally(self): + self.check_coverage("""\ + a, b, c, d, i = 1, 1, 1, 1, 99 + try: + for i in range(5): + try: + a = 5 + if i > 0: + continue + b = 8 + finally: + c = 10 + except: + d = 12 # C + assert (a, b, c, d) == (5, 8, 10, 1) # D + """, + arcz=".1 12 23 34 3D 45 56 67 68 7A 8A A3 BC CD D.", + arcz_missing="BC CD", + ) + def test_finally_in_loop_bug_92(self): self.check_coverage("""\ for i in range(5): |