From b09762df27d33bd42cb06197bee5b43bf3199eef Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 15 Feb 2020 00:32:16 +0100 Subject: [PATCH] doc: link to `python_files` from "Assertion Rewriting" (#6705) Ref: https://github.com/pytest-dev/pytest/issues/6377 Ref: https://github.com/blueyed/pytest/pull/145 --- doc/en/writing_plugins.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 2f7283791..045e13e75 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -181,6 +181,7 @@ done via a :pep:`302` import hook which gets installed early on when ``pytest`` starts up and will perform this rewriting when modules get imported. However since we do not want to test different bytecode then you will run in production this hook only rewrites test modules +themselves (as defined by the :confval:`python_files` configuration option) themselves as well as any modules which are part of plugins. Any other imported module will not be rewritten and normal assertion behaviour will happen.