Skip to content

Commit

Permalink
Make show_contexts available to set_option, and document it.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jun 30, 2019
1 parent 612d660 commit 201f5e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coverage/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ def __init__(self):
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"
Expand Down Expand Up @@ -355,6 +355,7 @@ def from_file(self, filename, our_file):
('extra_css', 'html:extra_css'),
('html_dir', 'html:directory'),
('html_title', 'html:title'),
('show_contexts', 'html:show_contexts', 'boolean'),

# [xml]
('xml_output', 'xml:output'),
Expand Down
4 changes: 4 additions & 0 deletions doc/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 201f5e9

Please sign in to comment.