summaryrefslogtreecommitdiff
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
commit28bb6b6a885acfcb34b42b11b5d4220144b8fb2a (patch)
tree7f54310b87b63a82fdf0914cfcbd2a4fe25df25e
parent50352aa21ae4ad3943c7402cdc129ee862403dc1 (diff)
downloadpython-coveragepy-28bb6b6a885acfcb34b42b11b5d4220144b8fb2a.tar.gz
Add a warning about plugins potentially interfering with coverage measurement. Learned from #637
-rw-r--r--coverage/plugin.py10
-rw-r--r--doc/api_plugin.rst2
2 files changed, 10 insertions, 2 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py
index c935311..d5a9d59 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.
diff --git a/doc/api_plugin.rst b/doc/api_plugin.rst
index 80d0830..e400a29 100644
--- a/doc/api_plugin.rst
+++ b/doc/api_plugin.rst
@@ -9,8 +9,6 @@ Plug-in classes
.. :history: 20150815T132400, new doc for 4.0b2
-.. versionadded:: 4.0
-
.. automodule:: coverage.plugin