diff options
author | Steve <sleonard76@gmail.com> | 2014-05-26 13:42:02 -0400 |
---|---|---|
committer | Steve <sleonard76@gmail.com> | 2014-05-26 13:42:02 -0400 |
commit | ad32797629dfe2fe18d7301203e7afb2fcaa15d7 (patch) | |
tree | 8c8e377f20634b8c12aa0a95c3bc21116420589f /coverage/summary.py | |
parent | 8cfec5d9e75dd95a313af08b7f0dcd27c3585371 (diff) | |
download | python-coveragepy-git-ad32797629dfe2fe18d7301203e7afb2fcaa15d7.tar.gz |
Fix formatting when no missing lines; improve tests
Diffstat (limited to 'coverage/summary.py')
-rw-r--r-- | coverage/summary.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/coverage/summary.py b/coverage/summary.py index 3588d31b..1e55a7d4 100644 --- a/coverage/summary.py +++ b/coverage/summary.py @@ -38,7 +38,7 @@ class SummaryReporter(Reporter): header += " Missing" fmt_coverage += " %s" if self.branches: - fmt_coverage += ", Branches: %s" + fmt_coverage += "%sBranches: %s" rule = "-" * len(header) + "\n" header += "\n" fmt_coverage += "\n" @@ -61,9 +61,13 @@ class SummaryReporter(Reporter): args += (nums.n_branches, nums.n_missing_branches) args += (nums.pc_covered_str,) if self.config.show_missing: - args += (analysis.missing_formatted(),) + missing_fmtd = analysis.missing_formatted() + args += (missing_fmtd,) if self.branches: - args += (analysis.arcs_missing_formatted(),) + separator = "" + if missing_fmtd: + separator = ", " + args += (separator, analysis.arcs_missing_formatted(),) outfile.write(fmt_coverage % args) total += nums except KeyboardInterrupt: # pragma: not covered |