diff options
-rw-r--r-- | coverage/config.py | 3 | ||||
-rw-r--r-- | doc/config.rst | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/coverage/config.py b/coverage/config.py index f8c91897..01ceef79 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -202,12 +202,12 @@ class CoverageConfig(object): self.precision = 0 self.show_missing = False self.skip_covered = False - self.show_contexts = False # Defaults for [html] self.extra_css = None self.html_dir = "htmlcov" self.html_title = "Coverage report" + self.show_contexts = False # Defaults for [xml] self.xml_output = "coverage.xml" @@ -355,6 +355,7 @@ class CoverageConfig(object): ('extra_css', 'html:extra_css'), ('html_dir', 'html:directory'), ('html_title', 'html:title'), + ('show_contexts', 'html:show_contexts', 'boolean'), # [xml] ('xml_output', 'xml:output'), diff --git a/doc/config.rst b/doc/config.rst index dfff813a..04daa01d 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -275,6 +275,10 @@ also apply to HTML output, where appropriate. ``directory`` (string, default "htmlcov"): where to write the HTML report files. +``show_contexts`` (boolean): should the HTML report include an indication on +each line of which contexts executed the line. See :ref:`dynamic_contexts` for +details. + ``extra_css`` (string): the path to a file of CSS to apply to the HTML report. The file will be copied into the HTML output directory. Don't name it "style.css". This CSS is in addition to the CSS normally used, though you can |