summaryrefslogtreecommitdiff
path: root/coverage/plugin.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-02-10 12:47:11 -0500
committerNed Batchelder <ned@nedbatchelder.com>2018-02-10 12:47:11 -0500
commit5197eba7ad12ca5ef191ae57d72263f0eb8bf8cf (patch)
tree0a51403fd76ddde75d77c8c1de082159ac337962 /coverage/plugin.py
parentf9161bd5e7897c22ea5f72c18b448e62bcdf7ea3 (diff)
downloadpython-coveragepy-git-5197eba7ad12ca5ef191ae57d72263f0eb8bf8cf.tar.gz
Add a warning about plugins potentially interfering with coverage measurement. Learned from #637
Diffstat (limited to 'coverage/plugin.py')
-rw-r--r--coverage/plugin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py
index c9353115..d5a9d591 100644
--- a/coverage/plugin.py
+++ b/coverage/plugin.py
@@ -2,6 +2,8 @@
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""
+.. versionadded:: 4.0
+
Plug-in interfaces for coverage.py.
Coverage.py supports a few different kinds of plug-ins that change its
@@ -42,6 +44,12 @@ you want to configure your object before registering it.
Coverage.py will store its own information on your plug-in object, using
attributes whose names start with ``_coverage_``. Don't be startled.
+.. warning::
+ Plug-ins are imported by coverage.py before it begins measuring code.
+ If you write a plugin in your own project, it might import your product
+ code before coverage.py can start measuring. This can result in your
+ own code being reported as missing.
+
File Tracers
============
@@ -58,6 +66,8 @@ register your file tracer.
Configurers
===========
+.. versionadded:: 4.5
+
Configurers modify the configuration of coverage.py during start-up.
Configurers implement the :meth:`~coverage.CoveragePlugin.configure` method to
change the configuration.