summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-10-20 22:31:12 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-10-20 22:31:12 -0400
commit6fc10248ef78842f2e2b943eb79daa0525fb75fc (patch)
treec4e21ac5583e38b7446f33c1943a4667ba35ef3d /coverage
parentd231baa0d857da20e43e99554adcbd24294876a1 (diff)
downloadpython-coveragepy-6fc10248ef78842f2e2b943eb79daa0525fb75fc.tar.gz
Make the text report branch column match the HTML report
Diffstat (limited to 'coverage')
-rw-r--r--coverage/results.py5
-rw-r--r--coverage/summary.py6
2 files changed, 6 insertions, 5 deletions
diff --git a/coverage/results.py b/coverage/results.py
index 4449de5..6c41a94 100644
--- a/coverage/results.py
+++ b/coverage/results.py
@@ -86,7 +86,8 @@ class Analysis(object):
""" The missing branch arcs, formatted nicely.
Returns a string like "1->2, 1->3, 16->20". Omits any mention of
- missing lines, so if line 17 is missing, then 16->17 won't be included.
+ branches from missing lines, so if line 17 is missing, then 17->18
+ won't be included.
"""
arcs = self.missing_branch_arcs()
@@ -95,7 +96,7 @@ class Analysis(object):
pairs = []
for line, exits in line_exits:
for ex in sorted(exits):
- if line not in missing and ex not in missing:
+ if line not in missing:
pairs.append('%d->%d' % (line, ex))
return ', '.join(pairs)
diff --git a/coverage/summary.py b/coverage/summary.py
index 9d31c22..a166ec2 100644
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -29,7 +29,7 @@ class SummaryReporter(Reporter):
header = (fmt_name % "Name") + " Stmts Miss"
fmt_coverage = fmt_name + "%6d %6d"
if self.branches:
- header += " Branch BrMiss"
+ header += " Branch BrPart"
fmt_coverage += " %6d %6d"
width100 = Numbers.pc_str_width()
header += "%*s" % (width100+4, "Cover")
@@ -56,7 +56,7 @@ class SummaryReporter(Reporter):
nums = analysis.numbers
args = (cu.name, nums.n_statements, nums.n_missing)
if self.branches:
- args += (nums.n_branches, nums.n_missing_branches)
+ args += (nums.n_branches, nums.n_partial_branches)
args += (nums.pc_covered_str,)
if self.config.show_missing:
missing_fmtd = analysis.missing_formatted()
@@ -84,7 +84,7 @@ class SummaryReporter(Reporter):
outfile.write(rule)
args = ("TOTAL", total.n_statements, total.n_missing)
if self.branches:
- args += (total.n_branches, total.n_missing_branches)
+ args += (total.n_branches, total.n_partial_branches)
args += (total.pc_covered_str,)
if self.config.show_missing:
args += ("",)