summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-11-11 10:29:25 -0500
committerNed Batchelder <ned@nedbatchelder.com>2019-11-11 10:29:25 -0500
commit24c3417138850981e5f3dbfb17aa12a9bb951559 (patch)
tree889d51615e7a4b1130f7f79c048af047e6690155
parent0c0051f0f894efca679174deb800aaab4af998dc (diff)
downloadpython-coveragepy-git-24c3417138850981e5f3dbfb17aa12a9bb951559.tar.gz
Mention pytest-cov --cov-context
-rw-r--r--doc/contexts.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/contexts.rst b/doc/contexts.rst
index 89341f4a..0d1cfe1e 100644
--- a/doc/contexts.rst
+++ b/doc/contexts.rst
@@ -55,6 +55,10 @@ There are three ways to enable dynamic contexts:
* another tool (such as a test runner) can call the
:meth:`.Coverage.switch_context` method to set the context explicitly.
+ The pytest plugin `pytest-cov`_ has a ``--cov-context`` option that uses this
+ to set the dynamic context for each test.
+
+.. _pytest-cov: https://pypi.org/project/pytest-cov/
The ``[run] dynamic_context`` setting has only one option now. Set it to
``test_function`` to start a new dynamic context for every test function::