diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-30 21:35:27 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-30 21:35:27 -0500 |
commit | c6fa6ceb98cecc4b2b3ce09225f60f733910f2b2 (patch) | |
tree | ec1d38284b6cc334e0101d419aa629bb3b6aa98f /coverage/html.py | |
parent | 18709b4ff679c7d882859e821d605012d1b9996e (diff) | |
download | python-coveragepy-c6fa6ceb98cecc4b2b3ce09225f60f733910f2b2.tar.gz |
A little explanation of the partial branch annotations in the HTML report.
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 6df84a5..3671f03 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -80,7 +80,8 @@ class HtmlReporter(Reporter): lineno += 1 # 1-based line numbers. # Figure out how to mark this line. line_class = "" - annotate = "" + annotate_html = "" + annotate_title = "" if lineno in analysis.statements: line_class += " stm" if lineno in analysis.excluded: @@ -96,7 +97,11 @@ class HtmlReporter(Reporter): annlines.append("exit") else: annlines.append(str(b)) - annotate = " ".join(annlines) + annotate_html = " ".join(annlines) + if len(annlines) > 1: + annotate_title = "no jumps to these line numbers" + elif len(annlines) == 1: + annotate_title = "no jump to this line number" elif lineno in analysis.statements: line_class += c_run @@ -113,7 +118,8 @@ class HtmlReporter(Reporter): 'html': html, 'number': lineno, 'class': line_class.strip() or "pln", - 'annotate': annotate, + 'annotate': annotate_html, + 'annotate_title': annotate_title, }) # Write the HTML page for this file. |