summaryrefslogtreecommitdiff
path: root/coverage
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 /coverage
parent50352aa21ae4ad3943c7402cdc129ee862403dc1 (diff)
downloadpython-coveragepy-28bb6b6a885acfcb34b42b11b5d4220144b8fb2a.tar.gz
Add a warning about plugins potentially interfering with coverage measurement. Learned from #637
Diffstat (limited to 'coverage')
-rw-r--r--coverage/plugin.py10
1 files changed, 10 insertions, 0 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.