Skip to content

Commit aeefc96

Browse files
committed
Rewrite the whole paragraph and use a block to make it stand out more.
1 parent 87d8b0c commit aeefc96

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/config.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ For full details refer to the `coverage config file`_ documentation.
2121

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

24-
**Important Note :** This plugin controls some options and setting the option in the config file will have no
25-
effect. These include specifying source to be measured ("source" option) and all data file handling
26-
("data_file" and "parallel" options).
24+
.. note:: Important Note
25+
26+
This plugin overrides the ``data_file`` and ``parallel`` options of coverage. Unless you also run coverage without
27+
pytest-cov it's pointless to set those options in your ``.coveragerc``.
28+
29+
If you use the ``--cov=something`` option (with a value) then coverage's ``source`` option will also get overriden.
30+
If you have multiple sources it might be easier to set those in ``.coveragerc`` and always use ``--cov`` (wihout a value)
31+
instead of having a long command line with ``--cov=pkg1 --cov=pkg2 --cov=pkg3 ...``.
32+
33+
If you use the ``--cov-branch`` option then coverage's ``branch`` option will also get overriden.
2734

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

0 commit comments

Comments
 (0)