summaryrefslogtreecommitdiff
path: root/doc/contexts.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/contexts.rst')
-rw-r--r--doc/contexts.rst18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/contexts.rst b/doc/contexts.rst
index c1d4a173..1f1ce763 100644
--- a/doc/contexts.rst
+++ b/doc/contexts.rst
@@ -16,9 +16,8 @@ in which it was run. This can provide more information to help you understand
the behavior of your tests.
There are two kinds of context: static and dynamic. Static contexts are fixed
-for an entire run, and are set explicitly with an option.
-
-Dynamic contexts are coming soon.
+for an entire run, and are set explicitly with an option. Dynamic contexts
+change over the course of a single run.
Static contexts
@@ -39,7 +38,18 @@ A static context is specified with the ``--context=CONTEXT`` option to
Dynamic contexts
----------------
-Not implemented yet.
+Dynamic contexts are found during execution. There is currently support for
+one kind: test function names. Set the ``dynamic_context`` option to
+``test_function`` in the configuration file::
+
+ [run]
+ dynamic_context = test_function
+
+Each test function you run will be considered a separate dynamic context, and
+coverage data will be segregated for each. A test function is any function
+whose names starts with "test".
+
+Ideas are welcome for other dynamic contexts that would be useful.
Context reporting