summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-07-19 15:23:26 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-07-19 15:23:26 -0400
commit9288ef767b461153c297f98e8d2989b796c41bba (patch)
tree8be207474083919252736992aa5768407056e90e
parent1f620f8581a6661a9b5ec78beaf77ae5a8ebf41c (diff)
downloadpython-coveragepy-git-9288ef767b461153c297f98e8d2989b796c41bba.tar.gz
docs: mention sys.setprofile as code that will not be measured. #1192
-rw-r--r--doc/trouble.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/trouble.rst b/doc/trouble.rst
index d508fd60..9c371df1 100644
--- a/doc/trouble.rst
+++ b/doc/trouble.rst
@@ -42,8 +42,13 @@ coverage.py from working properly:
sys.settrace, then it will conflict with coverage.py, and it won't be
measured properly.
+* `sys.setprofile`_ calls your code, but while running your code, does not fire
+ trace events. This means that coverage.py can't see what's happening in that
+ code.
+
.. _execv: https://docs.python.org/3/library/os.html#os.execl
.. _sys.settrace: https://docs.python.org/3/library/sys.html#sys.settrace
+.. _sys.setprofile: https://docs.python.org/3/library/sys.html#sys.setprofile
.. _thread: https://docs.python.org/3/library/_thread.html
.. _threading: https://docs.python.org/3/library/threading.html
.. _issue 43: https://github.com/nedbat/coveragepy/issues/43