Skip to content

Commit

Permalink
Rewrite the whole paragraph and use a block to make it stand out more.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Sep 5, 2020
1 parent 87d8b0c commit aeefc96
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/config.rst
Expand Up @@ -21,9 +21,16 @@ For full details refer to the `coverage config file`_ documentation.

.. _`coverage config file`: https://coverage.readthedocs.io/en/latest/config.html

**Important Note :** This plugin controls some options and setting the option in the config file will have no
effect. These include specifying source to be measured ("source" option) and all data file handling
("data_file" and "parallel" options).
.. note:: Important Note

This plugin overrides the ``data_file`` and ``parallel`` options of coverage. Unless you also run coverage without
pytest-cov it's pointless to set those options in your ``.coveragerc``.

If you use the ``--cov=something`` option (with a value) then coverage's ``source`` option will also get overriden.
If you have multiple sources it might be easier to set those in ``.coveragerc`` and always use ``--cov`` (wihout a value)
instead of having a long command line with ``--cov=pkg1 --cov=pkg2 --cov=pkg3 ...``.

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

If you wish to always add pytest-cov with pytest, you can use ``addopts`` under ``pytest`` or ``tool:pytest`` section.
For example: ::
Expand Down

0 comments on commit aeefc96

Please sign in to comment.