From 1c96df0e2a02da1d07730125a5738d8277397854 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 27 Oct 2009 07:19:45 -0400 Subject: Didn't deal with internal returns properly. --- test/test_arcs.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/test_arcs.py') diff --git a/test/test_arcs.py b/test/test_arcs.py index bc54429e..aafbb1d3 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 -- cgit v1.2.1