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 | c3fd76b5c7902dc345e83854b0a9db4e8c1475a1 (patch) | |
tree | 9058b3f0e3105114239969d333abc93db25c24ee /tests/test_arcs.py | |
parent | 18649f5d03c962211c3a157896aee5053992594a (diff) | |
download | python-coveragepy-c3fd76b5c7902dc345e83854b0a9db4e8c1475a1.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 a245e21..5baf947 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): |