diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-12 08:15:56 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-12 08:15:56 -0400 |
commit | 77dc1d8c258f0a3d7dc640356b30d1f173faf68e (patch) | |
tree | fd86287c9eded9eb4d06dafb70f3cecf9b729cb5 /coverage/html.py | |
parent | c210ecb765bc60b2424df284d0c101dc0bfeaf4d (diff) | |
download | python-coveragepy-git-77dc1d8c258f0a3d7dc640356b30d1f173faf68e.tar.gz |
Include the template source in the hash to make development easier
Diffstat (limited to 'coverage/html.py')
-rw-r--r-- | coverage/html.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/coverage/html.py b/coverage/html.py index 203169b5..6cfb85ff 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -105,7 +105,8 @@ class HtmlReporter(Reporter): '__url__': coverage.__url__, '__version__': coverage.__version__, } - self.source_tmpl = Templite(read_data("pyfile.html"), self.template_globals) + self.pyfile_html_source = read_data("pyfile.html") + self.source_tmpl = Templite(self.pyfile_html_source, self.template_globals) self.data = cov.get_data() @@ -125,13 +126,13 @@ class HtmlReporter(Reporter): """ assert self.config.html_dir, "must give a directory for html reporting" - self.coverage.get_data().set_query_contexts(self.config.query_contexts) # Read the status data. self.status.read(self.config.html_dir) # Check that this run used the same settings as the last run. m = Hasher() m.update(self.config) + m.update(self.pyfile_html_source) these_settings = m.hexdigest() if self.status.settings_hash() != these_settings: self.status.reset() @@ -142,6 +143,7 @@ class HtmlReporter(Reporter): self.extra_css = os.path.basename(self.config.extra_css) # Process all the files. + self.coverage.get_data().set_query_contexts(self.config.query_contexts) self.report_files(self.html_file, morfs, self.config.html_dir) if not self.all_files_nums: |