Skip to content

Commit 2d41845

Browse files
committed
Reword --cov-config caveat section and hopefully clear confusions. Closes #598.
1 parent 605daaa commit 2d41845

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/config.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ Caveats
5151
A unfortunate consequence of coverage.py's history is that ``.coveragerc`` is a magic name: it's the default file but it also
5252
means "try to also lookup coverage configuration in ``tox.ini`` or ``setup.cfg``".
5353

54-
In practical terms this means that if you have your coverage configuration in ``tox.ini`` or ``setup.cfg`` it is paramount
55-
that you also use ``--cov-config=tox.ini`` or ``--cov-config=setup.cfg``.
54+
In practical terms this means that if you have multiple configuration files around (``tox.ini``, ``pyproject.toml`` or ``setup.cfg``) you
55+
might need to use ``--cov-config`` to make coverage use the correct configuration file.
5656

57-
You might not be affected but it's unlikely that you won't ever use ``chdir`` in a test.
57+
Also, if you change the working directory and also use subprocesses in a test you might also need to use ``--cov-config`` to make pytest-cov
58+
will use the expected configuration file in the subprocess.
5859

5960
Reference
6061
=========

0 commit comments

Comments
 (0)