Skip to content
Merged
Changes from all commits
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
11 changes: 9 additions & 2 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ For full details refer to the `coverage config file`_ documentation.

If you use the ``--cov-branch`` option then coverage's ``branch`` option will also get overridden.

If you wish to always add pytest-cov with pytest, you can use ``addopts`` under ``pytest`` or ``tool:pytest`` section.
For example: ::
If you wish to always add pytest-cov with pytest, you can use ``addopts`` under the ``pytest`` or ``tool:pytest`` section of
your ``setup.cfg``, or the ``tool.pytest.ini_options`` section of your ``pyproject.toml`` file.

For example, in ``setup.cfg``: ::

[tool:pytest]
addopts = --cov=<project-name> --cov-report html

Or for ``pyproject.toml``: ::

[tool.pytest.ini_options]
addopts = "--cov=<project-name> --cov-report html"

Caveats
=======

Expand Down