summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 4358a541..c40508da 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -581,6 +581,10 @@ class Coverage(object):
raise CoverageException(
"Cannot switch context, coverage is not started"
)
+
+ if self._collector.should_start_context:
+ self._warn("Conflicting dynamic contexts", slug="dynamic-conflict", once=True)
+
self._collector.switch_context(new_context)
def clear_exclude(self, which='exclude'):