summaryrefslogtreecommitdiff
path: root/tests/test_arcs.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-12-18 22:44:13 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-12-18 22:44:13 -0500
commit198e05e57f284038da800b81cd403dd48f5f4bba (patch)
tree502bac77946fcb15894a34f94f740f4e633ef7d9 /tests/test_arcs.py
parent68f49df2206e6ed80827578ba00b59298f1e337f (diff)
downloadpython-coveragepy-198e05e57f284038da800b81cd403dd48f5f4bba.tar.gz
Fix #496, while-true loop with a continue.
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r--tests/test_arcs.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index 5baf947..36eb4fa 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -270,6 +270,22 @@ class LoopArcTest(CoverageTest):
arcz=arcz,
)
+ def test_bug_496_continue_in_constant_while(self):
+ # https://bitbucket.org/ned/coveragepy/issue/496
+ if env.PY3:
+ arcz = ".1 12 23 34 43 45 5."
+ else:
+ arcz = ".1 12 2-1 23 34 42 45 5."
+ self.check_coverage("""\
+ up = iter('ta')
+ while True:
+ char = next(up)
+ if char == 't': continue
+ break
+ """,
+ arcz=arcz
+ )
+
def test_for_if_else_for(self):
self.check_coverage("""\
def branches_2(l):