summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-03-13 22:14:57 -0500
committerNed Batchelder <ned@nedbatchelder.com>2010-03-13 22:14:57 -0500
commit3f43a51c7a1e4532d57dc3cd95fa6c4397c87f50 (patch)
tree9bef9e74ff78aa250f4f3ca230eaad5d3a9b0c26 /coverage
parent76aa3fbcb1592ac4b83363cee8e17094ed3c508f (diff)
downloadpython-coveragepy-git-3f43a51c7a1e4532d57dc3cd95fa6c4397c87f50.tar.gz
Reports now emphasize missed lines over executed lines, since those are more helpful for directing developers to improved test coverage.
Diffstat (limited to 'coverage')
-rw-r--r--coverage/htmlfiles/index.html12
-rw-r--r--coverage/htmlfiles/pyfile.html2
-rw-r--r--coverage/summary.py12
3 files changed, 13 insertions, 13 deletions
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 @@
<tr class='tablehead' title='Click to sort'>
<th class='name left headerSortDown'>Module</th>
<th>statements</th>
- <th>run</th>
+ <th>missing</th>
<th>excluded</th>
{% if arcs %}
<th>branches</th>
- <th>br exec</th>
+ <th>partial</th>
{% endif %}
<th class='right'>coverage</th>
</tr>
@@ -42,11 +42,11 @@
<tr class='total'>
<td class='name left'>Total</td>
<td>{{totals.n_statements}}</td>
- <td>{{totals.n_executed}}</td>
+ <td>{{totals.n_missing}}</td>
<td>{{totals.n_excluded}}</td>
{% if arcs %}
<td>{{totals.n_branches}}</td>
- <td>{{totals.n_executed_branches}}</td>
+ <td>{{totals.n_missing_branches}}</td>
{% endif %}
<td class='right'>{{totals.pc_covered|format_pct}}%</td>
</tr>
@@ -56,11 +56,11 @@
<tr class='file'>
<td class='name left'><a href='{{file.html_filename}}'>{{file.cu.name}}</a></td>
<td>{{file.nums.n_statements}}</td>
- <td>{{file.nums.n_executed}}</td>
+ <td>{{file.nums.n_missing}}</td>
<td>{{file.nums.n_excluded}}</td>
{% if arcs %}
<td>{{file.nums.n_branches}}</td>
- <td>{{file.nums.n_executed_branches}}</td>
+ <td>{{file.nums.n_missing_branches}}</td>
{% endif %}
<td class='right'>{{file.nums.pc_covered|format_pct}}%</td>
</tr>
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 @@
<h2 class='stats'>
{{nums.n_statements}} statements
<span class='{{c_run}}' onclick='toggle_lines(this, "run")'>{{nums.n_executed}} run</span>
- <span class='{{c_exc}}' onclick='toggle_lines(this, "exc")'>{{nums.n_excluded}} excluded</span>
<span class='{{c_mis}}' onclick='toggle_lines(this, "mis")'>{{nums.n_missing}} missing</span>
+ <span class='{{c_exc}}' onclick='toggle_lines(this, "exc")'>{{nums.n_excluded}} excluded</span>
{% if arcs %}
<span class='{{c_par}}' onclick='toggle_lines(this, "par")'>{{n_par}} partial</span>
{% 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 += ("",)