diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-02 11:10:19 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-02 11:10:19 -0500 |
commit | f6bc21ddee35703d80914d245f06ee5ce594eb97 (patch) | |
tree | 6bc33549d11dc4d1d830344e81b5501ded61d936 /coverage/htmlfiles | |
parent | 467eb680940b8653667751f4232a3d46f61d8350 (diff) | |
download | python-coveragepy-git-f6bc21ddee35703d80914d245f06ee5ce594eb97.tar.gz |
HTML reporting makes use of Numbers to simplify and centralize the code.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r-- | coverage/htmlfiles/index.html | 18 | ||||
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index 03a83cc3..1e11e9e1 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -10,7 +10,7 @@ <div id='header'>
<div class='content'>
<h1>Coverage report:
- <span class='pc_cov'>{{total_cov|format_pct}}%</span>
+ <span class='pc_cov'>{{totals.percent_covered|format_pct}}%</span>
</h1>
</div>
</div>
@@ -30,24 +30,24 @@ {% for file in files %}
<tr class='file'>
<td class='name'><a href='{{file.html_filename}}'>{{file.cu.name}}</a></td>
- <td>{{file.stm}}</td>
- <td>{{file.run}}</td>
- <td>{{file.exc}}</td>
+ <td>{{file.nums.n_statements}}</td>
+ <td>{{file.nums.n_run}}</td>
+ <td>{{file.nums.n_excluded}}</td>
{% if arcs %}
<td>{{file.par}}</td>
{% endif %}
- <td>{{file.pc_cov|format_pct}}%</td>
+ <td>{{file.nums.percent_covered|format_pct}}%</td>
</tr>
{% endfor %}
<tr class='total'>
<td class='name'>Total</td>
-<td>{{total_stm}}</td>
-<td>{{total_run}}</td>
-<td>{{total_exc}}</td>
+<td>{{totals.n_statements}}</td>
+<td>{{totals.n_run}}</td>
+<td>{{totals.n_excluded}}</td>
{% if arcs %}
<td>{{total_par}}</td>
{% endif %}
-<td>{{total_cov|format_pct}}%</td>
+<td>{{totals.percent_covered|format_pct}}%</td>
</tr>
</table>
</div>
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index e2ec19c3..5c9509bc 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -23,13 +23,13 @@ function toggle_lines(btn, cls) { <div id='header'>
<div class='content'>
<h1>Coverage for <b>{{cu.name|escape}}</b> :
- <span class='pc_cov'>{{pc_cov|format_pct}}%</span>
+ <span class='pc_cov'>{{nums.percent_covered|format_pct}}%</span>
</h1>
<h2 class='stats'>
- {{n_stm}} statements
- <span class='{{c_run.strip}}' onclick='toggle_lines(this, "run")'>{{n_run}} run</span>
- <span class='{{c_exc.strip}}' onclick='toggle_lines(this, "exc")'>{{n_exc}} excluded</span>
- <span class='{{c_mis.strip}}' onclick='toggle_lines(this, "mis")'>{{n_mis}} missing</span>
+ {{nums.n_statements}} statements
+ <span class='{{c_run.strip}}' onclick='toggle_lines(this, "run")'>{{nums.n_run}} run</span>
+ <span class='{{c_exc.strip}}' onclick='toggle_lines(this, "exc")'>{{nums.n_excluded}} excluded</span>
+ <span class='{{c_mis.strip}}' onclick='toggle_lines(this, "mis")'>{{nums.n_missing}} missing</span>
{% if arcs %}
<span class='{{c_par.strip}}' onclick='toggle_lines(this, "par")'>{{n_par}} partial</span>
{% endif %}
|