summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-10-25 09:39:28 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-10-25 09:39:28 -0400
commit02b4d71cf2d9431d4affd16713df7ded77eaa034 (patch)
treeee22c3a9343032853f0e9fd41755d6a779e1e21c /coverage/html.py
parent82282aac7b8f8c963bb94e7a40a0aa1d05cb6c87 (diff)
downloadpython-coveragepy-02b4d71cf2d9431d4affd16713df7ded77eaa034.tar.gz
Stupid simplistic not working yet branch reporting in HTML
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 99b291b..df7bc03 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,