summaryrefslogtreecommitdiff
path: root/coverage/summary.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-07-08 06:25:17 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-07-08 06:25:17 -0400
commitc317727542e303ae9dd5ed4db73217508e367d74 (patch)
treea10fcf53481e773f1ab97eef8188b89172a68404 /coverage/summary.py
parenta63bf56c15835c763f60ff0ba3f782c8fb86363c (diff)
downloadpython-coveragepy-git-c317727542e303ae9dd5ed4db73217508e367d74.tar.gz
Improve branch summarization
It failed completely on more than one file! Removed the Branches label, and no longer report missing branches implied by missing lines.
Diffstat (limited to 'coverage/summary.py')
-rw-r--r--coverage/summary.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/coverage/summary.py b/coverage/summary.py
index 1e55a7d4..a6768cf9 100644
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -37,8 +37,6 @@ class SummaryReporter(Reporter):
if self.config.show_missing:
header += " Missing"
fmt_coverage += " %s"
- if self.branches:
- fmt_coverage += "%sBranches: %s"
rule = "-" * len(header) + "\n"
header += "\n"
fmt_coverage += "\n"
@@ -62,12 +60,13 @@ class SummaryReporter(Reporter):
args += (nums.pc_covered_str,)
if self.config.show_missing:
missing_fmtd = analysis.missing_formatted()
- args += (missing_fmtd,)
if self.branches:
- separator = ""
- if missing_fmtd:
- separator = ", "
- args += (separator, analysis.arcs_missing_formatted(),)
+ branches_fmtd = analysis.arcs_missing_formatted()
+ if branches_fmtd:
+ if missing_fmtd:
+ missing_fmtd += ", "
+ missing_fmtd += branches_fmtd
+ args += (missing_fmtd,)
outfile.write(fmt_coverage % args)
total += nums
except KeyboardInterrupt: # pragma: not covered