Added note to writing_plugins.rst (#7896)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Nimesh Vashistha 2020-10-17 16:56:30 +05:30 committed by GitHub
parent b4c28dcaa2
commit 991bc7bd50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -688,6 +688,10 @@ items, delete or otherwise amend the test items:
.. autofunction:: pytest_collection_modifyitems
.. note::
If this hook is implemented in ``conftest.py`` files, it always receives all collected items, not only those
under the ``conftest.py`` where it is implemented.
.. autofunction:: pytest_collection_finish
Test running (runtest) hooks

View File

@ -107,6 +107,10 @@ Here is how you might run it::
See also: :ref:`pythonpath`.
.. note::
Some hooks should be implemented only in plugins or conftest.py files situated at the
tests root directory due to how pytest discovers plugins during startup,
see the documentation of each hook for details.
Writing your own plugin
-----------------------