From 3f43a51c7a1e4532d57dc3cd95fa6c4397c87f50 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 13 Mar 2010 22:14:57 -0500 Subject: Reports now emphasize missed lines over executed lines, since those are more helpful for directing developers to improved test coverage. --- coverage/htmlfiles/index.html | 12 ++++++------ coverage/htmlfiles/pyfile.html | 2 +- coverage/summary.py | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'coverage') diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index 700ff8bb..9b8214ff 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -28,11 +28,11 @@ Module statements - run + missing excluded {% if arcs %} branches - br exec + partial {% endif %} coverage @@ -42,11 +42,11 @@ Total {{totals.n_statements}} - {{totals.n_executed}} + {{totals.n_missing}} {{totals.n_excluded}} {% if arcs %} {{totals.n_branches}} - {{totals.n_executed_branches}} + {{totals.n_missing_branches}} {% endif %} {{totals.pc_covered|format_pct}}% @@ -56,11 +56,11 @@ {{file.cu.name}} {{file.nums.n_statements}} - {{file.nums.n_executed}} + {{file.nums.n_missing}} {{file.nums.n_excluded}} {% if arcs %} {{file.nums.n_branches}} - {{file.nums.n_executed_branches}} + {{file.nums.n_missing_branches}} {% endif %} {{file.nums.pc_covered|format_pct}}% diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index ec69556d..209887b7 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -17,8 +17,8 @@

{{nums.n_statements}} statements {{nums.n_executed}} run - {{nums.n_excluded}} excluded {{nums.n_missing}} missing + {{nums.n_excluded}} excluded {% if arcs %} {{n_par}} partial {% endif %} diff --git a/coverage/summary.py b/coverage/summary.py index 3db7b767..7348acab 100644 --- a/coverage/summary.py +++ b/coverage/summary.py @@ -23,10 +23,10 @@ class SummaryReporter(Reporter): max_name = max([len(cu.name) for cu in self.code_units] + [5]) fmt_name = "%%- %ds " % max_name fmt_err = "%s %s: %s\n" - header = (fmt_name % "Name") + " Stmts Exec" + header = (fmt_name % "Name") + " Stmts Miss" fmt_coverage = fmt_name + "%6d %6d" if self.branches: - header += " Branch BrExec" + header += " Branch BrPart" fmt_coverage += " %6d %6d" header += " Cover" fmt_coverage += " %5d%%" @@ -50,9 +50,9 @@ class SummaryReporter(Reporter): try: analysis = self.coverage._analyze(cu) nums = analysis.numbers - args = (cu.name, nums.n_statements, nums.n_executed) + args = (cu.name, nums.n_statements, nums.n_missing) if self.branches: - args += (nums.n_branches, nums.n_executed_branches) + args += (nums.n_branches, nums.n_missing_branches) args += (nums.pc_covered,) if self.show_missing: args += (analysis.missing_formatted(),) @@ -67,9 +67,9 @@ class SummaryReporter(Reporter): if total.n_files > 1: outfile.write(rule) - args = ("TOTAL", total.n_statements, total.n_executed) + args = ("TOTAL", total.n_statements, total.n_missing) if self.branches: - args += (total.n_branches, total.n_executed_branches) + args += (total.n_branches, total.n_missing_branches) args += (total.pc_covered,) if self.show_missing: args += ("",) -- cgit v1.2.1