Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/14557.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarified that conftest files discovered during collection are not available for hooks which run before collection, such as :hook:`pytest_sessionstart` and :hook:`pytest_report_header`.
5 changes: 5 additions & 0 deletions doc/en/how-to/writing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ Plugin discovery order at tool startup
After a ``conftest.py`` file is loaded, recursively load all plugins specified
in its :globalvar:`pytest_plugins` variable if present.

These initial conftest files are loaded before collection starts. Conftest
files discovered later during collection can still implement hooks, but they
are not available for hooks which run before collection, such as
:hook:`pytest_sessionstart` and :hook:`pytest_report_header`.


.. _`conftest.py plugins`:
.. _`localplugin`:
Expand Down
Loading