diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-10-24 20:30:15 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-10-24 20:30:15 -0400 |
commit | 02e3d4392b25b8c3fff9e7a00c86665d26fe1ba9 (patch) | |
tree | 60119cf1f29a43becb47c2a6f8bdc14a8707777a /coverage/html.py | |
parent | d18f41158f3e282c84169816d0f0261e52a02046 (diff) | |
download | python-coveragepy-git-02e3d4392b25b8c3fff9e7a00c86665d26fe1ba9.tar.gz |
Commonalize the computation of total coverage percentage for a file.
Diffstat (limited to 'coverage/html.py')
-rw-r--r-- | coverage/html.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/coverage/html.py b/coverage/html.py index 9a68b2c1..99b291b4 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -92,11 +92,8 @@ class HtmlReporter(Reporter): n_exc = len(analysis.excluded) n_mis = len(analysis.missing) n_run = n_stm - n_mis - if n_stm > 0: - pc_cov = 100.0 * n_run / n_stm - else: - pc_cov = 100.0 - + pc_cov = analysis.percent_covered() + # These classes determine which lines are highlighted by default. c_run = " run hide" c_exc = " exc" |