diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-08-22 23:18:14 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-08-22 23:18:14 -0400 |
commit | 94bf5f731aa8addcedb162525e96c4e1bd2ebfdd (patch) | |
tree | 29eac92761293f63b4a5e27c91fcdbd3a4ca2113 /coverage/htmlfiles | |
parent | 3d4c985b248793c600e391fcbec0f835ca5e1e9d (diff) | |
download | python-coveragepy-git-94bf5f731aa8addcedb162525e96c4e1bd2ebfdd.tar.gz |
Unify formatting of coverage percentages, and don't show zero or 100 as a result of rounding. Fixes #41 and #70.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r-- | coverage/htmlfiles/index.html | 6 | ||||
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index c1ef8ad7..bec2584f 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -16,7 +16,7 @@ <div id='header'> <div class='content'> <h1>Coverage report: - <span class='pc_cov'>{{totals.pc_covered|format_pct}}%</span> + <span class='pc_cov'>{{totals.pc_covered_str}}%</span> </h1> </div> </div> @@ -48,7 +48,7 @@ <td>{{totals.n_branches}}</td> <td>{{totals.n_missing_branches}}</td> {% endif %} - <td class='right'>{{totals.pc_covered|format_pct}}%</td> + <td class='right'>{{totals.pc_covered_str}}%</td> </tr> </tfoot> <tbody> @@ -62,7 +62,7 @@ <td>{{file.nums.n_branches}}</td> <td>{{file.nums.n_missing_branches}}</td> {% endif %} - <td class='right'>{{file.nums.pc_covered|format_pct}}%</td> + <td class='right'>{{file.nums.pc_covered_str}}%</td> </tr> {% endfor %} </tbody> diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index 035691c8..05b2b464 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -5,7 +5,7 @@ {# IE8 rounds line-height incorrectly, and adding this emulateIE7 line makes it right! #} {# http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/7684445e-f080-4d8f-8529-132763348e21 #} <meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' /> - <title>Coverage for {{cu.name|escape}}: {{nums.pc_covered|format_pct}}%</title> + <title>Coverage for {{cu.name|escape}}: {{nums.pc_covered_str}}%</title> <link rel='stylesheet' href='style.css' type='text/css'> <script type='text/javascript' src='jquery-1.3.2.min.js'></script> <script type='text/javascript' src='coverage_html.js'></script> @@ -18,7 +18,7 @@ <div id='header'> <div class='content'> <h1>Coverage for <b>{{cu.name|escape}}</b> : - <span class='pc_cov'>{{nums.pc_covered|format_pct}}%</span> + <span class='pc_cov'>{{nums.pc_covered_str}}%</span> </h1> <h2 class='stats'> {{nums.n_statements}} statements |