diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-10-27 07:19:45 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-10-27 07:19:45 -0400 |
commit | 934778095e46933f06251d6b27d2d37ec8ac7538 (patch) | |
tree | 9f7bebaeb2bcfb8c3f537943ac42b63863733777 /test/test_arcs.py | |
parent | b9948256ed3ba8f3f944f1066cc05ef45a42e92e (diff) | |
download | python-coveragepy-934778095e46933f06251d6b27d2d37ec8ac7538.tar.gz |
Didn't deal with internal returns properly.
Diffstat (limited to 'test/test_arcs.py')
-rw-r--r-- | test/test_arcs.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_arcs.py b/test/test_arcs.py index bc54429..aafbb1d 100644 --- a/test/test_arcs.py +++ b/test/test_arcs.py @@ -327,3 +327,17 @@ class ExceptionArcTest(CoverageTest): """, arcz=".1 12 .3 3. 24 45 56 67 7B 89 9B BC C.", arcz_missing="67 7B", arcz_unpredicted="68") + + def test_if_return(self): + self.check_coverage("""\ + def if_ret(a): + if a: + return 3 + b = 4 + return 5 + x = if_ret(0) + if_ret(1) + assert x == 8 + """, + arcz=".1 16 67 7. .2 23 24 3. 45 5.", + arcz_missing="" + )
\ No newline at end of file |