summaryrefslogtreecommitdiff
path: root/doc/contexts.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/contexts.rst')
-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::