From 9a60ad43f68b710075b49441e87b5ae74d68b186 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Tue, 21 Jan 2025 12:36:41 +0800 Subject: [PATCH 1/2] Improve configuration docs --- docs/config.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index 0d3bfacf..12d0f5ea 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -48,14 +48,14 @@ Or for ``pyproject.toml``: :: Caveats ======= -A unfortunate consequence of coverage.py's history is that ``.coveragerc`` is a magic name: it's the default file but it also +An unfortunate consequence of coverage.py's history is that ``.coveragerc`` is a magic name: it's the default file but it also means "try to also lookup coverage configuration in ``tox.ini`` or ``setup.cfg``". In practical terms this means that if you have multiple configuration files around (``tox.ini``, ``pyproject.toml`` or ``setup.cfg``) you might need to use ``--cov-config`` to make coverage use the correct configuration file. 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 -will use the expected configuration file in the subprocess. + use the expected configuration file in the subprocess. Reference ========= From 8d296ac3ff94d2bc187f8ed374f489a32cca913d Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Tue, 21 Jan 2025 22:07:41 +0800 Subject: [PATCH 2/2] Update docs/config.rst Co-authored-by: Ned Batchelder --- docs/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.rst b/docs/config.rst index 12d0f5ea..55d85aa6 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -55,7 +55,7 @@ In practical terms this means that if you have multiple configuration files arou might need to use ``--cov-config`` to make coverage use the correct configuration file. 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 - use the expected configuration file in the subprocess. +use the expected configuration file in the subprocess. Reference =========