Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change wording of documentation
  • Loading branch information
gnikonorov committed Dec 20, 2020
commit 01d08d492d96d3cd23260816dafdd3d38f5c0784
6 changes: 3 additions & 3 deletions docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ and thus not pick up your change.

The generated table will be sorted alphabetically unless the metadata is a :code:`collections.OrderedDict`.

It is also possible to redact variables from the environment table. Redacted variables will have their keys displayed, but their values grayed out.
It is possible to redact variables from the environment table. Redacted variables will have their names displayed, but their values grayed out.
This can be achieved by setting :code:`environment_table_redact_list` in your INI configuration file (e.g.: :code:`pytest.ini`).
:code:`environment_table_redact_list` is a :code:`linelist` of regexes. Any environment table key that matches a regex in this list has its value redacted.
:code:`environment_table_redact_list` is a :code:`linelist` of regexes. Any environment table variable that matches a regex in this list has its value redacted.

For example, the below will redact all environment table values whose keys match the regexes :code:`^foo$`, :code:`.*redact.*`, or :code:`bar`:
For example, the following will redact all environment table variables that match the regexes :code:`^foo$`, :code:`.*redact.*`, or :code:`bar`:

.. code-block:: ini

Expand Down
2 changes: 1 addition & 1 deletion src/pytest_html/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def pytest_addoption(parser):
"environment_table_redact_list",
type="linelist",
help="A list of regexes corresponding to environment "
"table keys whose values should be redacted from the report",
"table variables whose values should be redacted from the report",
)


Expand Down