diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-07-08 06:25:17 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-07-08 06:25:17 -0400 |
commit | 0e0c961754d175ce207008c350614b2eb4aded3c (patch) | |
tree | c0faa054531afbb41e65d162f899d65297d6f28c /coverage/summary.py | |
parent | 0baac6cd272fe328193b34ad8b562d53ef0f6bb4 (diff) | |
download | python-coveragepy-0e0c961754d175ce207008c350614b2eb4aded3c.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.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/coverage/summary.py b/coverage/summary.py index 1e55a7d..a6768cf 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 |