summaryrefslogtreecommitdiff
path: root/test/farm/html/src
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-11-30 21:35:27 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-11-30 21:35:27 -0500
commit9d2b8a09154727bee8c2296ea5852574c22a16cb (patch)
tree1a43543ed896e037776a218456ec421125547121 /test/farm/html/src
parent62cd957d5ff36fa745affac27d23be7d7928b40b (diff)
downloadpython-coveragepy-git-9d2b8a09154727bee8c2296ea5852574c22a16cb.tar.gz
A little explanation of the partial branch annotations in the HTML report.
Diffstat (limited to 'test/farm/html/src')
-rw-r--r--test/farm/html/src/b.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/farm/html/src/b.py b/test/farm/html/src/b.py
index e8752300..f5d051c6 100644
--- a/test/farm/html/src/b.py
+++ b/test/farm/html/src/b.py
@@ -1,8 +1,8 @@
# A test file for HTML reporting by coverage.
def one(x):
+ # This will be a branch that misses the else.
if x < 2:
- # Needed a < to look at HTML entities.
a = 3
else:
a = 4
@@ -10,7 +10,19 @@ def one(x):
one(1)
def two(x):
+ # A missed else that branches to "exit"
if x:
a = 5
two(1)
+
+def three_way():
+ # for-else can be a three-way branch.
+ for i in range(10):
+ if i == 3:
+ break
+ else:
+ return 23
+ return 17
+
+three_way()