diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-25 07:26:44 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-25 07:26:44 -0400 |
commit | 86983f76487ff246ef62daf5d02920568c0d69d2 (patch) | |
tree | 918e0ec6c2819773e4c6b948c30b7dce765e0e79 /coverage/html.py | |
parent | 9ca34fcc539dd218fddbba7d371bb0ee1c24e1d7 (diff) | |
download | python-coveragepy-git-86983f76487ff246ef62daf5d02920568c0d69d2.tar.gz |
Better modularity about which line classes are highlighted by default.
Diffstat (limited to 'coverage/html.py')
-rw-r--r-- | coverage/html.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/coverage/html.py b/coverage/html.py index ada19d93..41901b45 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -61,6 +61,11 @@ class HtmlReporter(Reporter): else: pc_cov = 100.0 + # These classes determine which lines are highlighted by default. + c_run = " run hide" + c_exc = " exc" + c_mis = " mis" + lines = [] for lineno, line in enumerate(source_lines): lineno += 1 # enum is 0-based, lines are 1-based. @@ -70,11 +75,11 @@ class HtmlReporter(Reporter): if lineno in statements: css_class += " stm" if lineno not in missing and lineno not in excluded: - css_class += " run hide" + css_class += c_run if lineno in excluded: - css_class += " exc" + css_class += c_exc if lineno in missing: - css_class += " mis" + css_class += c_mis lineinfo = { 'text': line, |