diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-18 21:56:14 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-18 21:56:14 -0500 |
commit | f19416a46c0ad1bff448b77d458e34760ba2a6a4 (patch) | |
tree | f1e7b2f21c5101925d7b4a4e76ff8c5ea28b5cb2 /tests/test_arcs.py | |
parent | 7c24b8bbfbfeb0d15d48157f70de7138d6e7c9da (diff) | |
download | python-coveragepy-git-f19416a46c0ad1bff448b77d458e34760ba2a6a4.tar.gz |
Clean up #493 fix
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index a245e214..5baf9476 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -762,34 +762,19 @@ class ExceptionArcTest(CoverageTest): def test_return_finally(self): self.check_coverage("""\ a = [1] - def func(): - try: - return 10 - finally: - a.append(6) - - assert func() == 10 - assert a == [1, 6] - """, - arcz=".1 12 28 89 9. -23 34 46 6-2", - ) - - def test_return_finally_before_return(self): - self.check_coverage("""\ - a = [] def check_token(data): if data: try: - return 1 + return 5 finally: - a.append(1) - return 2 - assert 2 == check_token(False) - assert [] == a - assert 1 == check_token(True) - assert [1] == a - """, - arcz=".1 12 29 9A AB BC C-1 -23 34 45 57 7-2 38 8-2", + a.append(7) + return 8 + assert check_token(False) == 8 + assert a == [1] + assert check_token(True) == 5 + assert a == [1, 7] + """, + arcz=".1 12 29 9A AB BC C-1 -23 34 45 57 7-2 38 8-2", ) def test_except_jump_finally(self): |