From 25aff80d444a6b1fa87173ffd8026f69be7ae0d0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 1 Jul 2019 23:14:15 -0400 Subject: Clean up and test filtering contexts for reporting --- coverage/html.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coverage/html.py') diff --git a/coverage/html.py b/coverage/html.py index cff2419d..fc3bb364 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -80,7 +80,9 @@ class HtmlDataGeneration(object): def __init__(self, cov): self.coverage = cov self.config = self.coverage.config - self.has_arcs = self.coverage.get_data().has_arcs() + data = self.coverage.get_data() + self.has_arcs = data.has_arcs() + data.set_query_contexts(self.config.report_contexts) def data_for_file(self, fr, analysis): """Produce the data needed for one file's report.""" @@ -218,7 +220,6 @@ class HtmlReporter(object): self.incr.check_global_data(self.config, self.pyfile_html_source) # Process all the files. - self.coverage.get_data().set_query_contexts(self.config.query_contexts) for fr, analysis in get_analysis_to_report(self.coverage, morfs): self.html_file(fr, analysis) -- cgit v1.2.1