From 48a3cc0cacaf2eb4e044cb3a83c83b48cd1aa67e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 27 May 2019 17:28:58 -0400 Subject: Include the count of contexts in the HTML report --- coverage/html.py | 1 + coverage/htmlfiles/pyfile.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'coverage') diff --git a/coverage/html.py b/coverage/html.py index 61edcb5d..203169b5 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -101,6 +101,7 @@ class HtmlReporter(Reporter): 'escape': escape, 'pair': pair, 'title': title, + 'len': len, '__url__': coverage.__url__, '__version__': coverage.__version__, } diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index 460c12b5..e85ee54c 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -93,7 +93,7 @@ {% for line in lines -%}

{#-#} {% if line.contexts -%} - ctx{#-#} + {{ line.contexts|len }} ctx{#-#} {% for context in line.contexts -%} {{context}}{#-#} -- cgit v1.2.1