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/12857.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Documented how ``--confcutdir`` affects initial ``conftest.py`` discovery.
7 changes: 5 additions & 2 deletions doc/en/how-to/writing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ Plugin discovery order at tool startup
:confval:`testpaths` if defined and running from the rootdir, otherwise the
current dir
- for each test path, load ``conftest.py`` and ``test*/conftest.py`` relative
to the directory part of the test path, if exist. Before a ``conftest.py``
file is loaded, load ``conftest.py`` files in all of its parent directories.
to the directory part of the test path, if they exist. Before a ``conftest.py``
file is loaded, load ``conftest.py`` files in its parent directories up to
the :option:`--confcutdir` limit. When ``--confcutdir`` is not provided,
the cutoff defaults to the directory containing the config file, or to the
:ref:`rootdir <rootdir>` if no config file is found.
After a ``conftest.py`` file is loaded, recursively load all plugins specified
in its :globalvar:`pytest_plugins` variable if present.

Expand Down
Loading