diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-10-25 09:39:28 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-10-25 09:39:28 -0400 |
commit | 7dad73478b4bcaee894cd7c3a725f3e177dd90cf (patch) | |
tree | 89b3c7d874026ab4114d440f54ef952098bf22bc /coverage/html.py | |
parent | fed97bc3dabc3b1af3000f9b842654a3836a96bc (diff) | |
download | python-coveragepy-git-7dad73478b4bcaee894cd7c3a725f3e177dd90cf.tar.gz |
Stupid simplistic not working yet branch reporting in HTML
Diffstat (limited to 'coverage/html.py')
-rw-r--r-- | coverage/html.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/coverage/html.py b/coverage/html.py index 99b291b4..df7bc03c 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -93,12 +93,16 @@ class HtmlReporter(Reporter): n_mis = len(analysis.missing) n_run = n_stm - n_mis pc_cov = analysis.percent_covered() - + + missing_branch_arcs = analysis.missing_branch_arcs() + n_par = len(missing_branch_arcs) + # These classes determine which lines are highlighted by default. c_run = " run hide" c_exc = " exc" c_mis = " mis" - + c_par = " par" + ws_tokens = [token.INDENT, token.DEDENT, token.NEWLINE, tokenize.NL] lines = [] line = [] @@ -120,7 +124,9 @@ class HtmlReporter(Reporter): line_class += c_exc if lineno in analysis.missing: line_class += c_mis - + if lineno in missing_branch_arcs: + line_class += c_par + lineinfo = { 'html': "".join(line), 'number': lineno, |