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 | 41804075a23bf70c5fcfadaf2be41009b480d299 (patch) | |
tree | 0efab1448847dc7a136a88917ee3c13a012634d8 /coverage/html.py | |
parent | 8dd7458290f99dc035a78b75e03f15b1e076b692 (diff) | |
download | python-coveragepy-41804075a23bf70c5fcfadaf2be41009b480d299.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 ada19d9..41901b4 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, |