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/12658.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved collection-reporting hooks in the API reference from “Reporting hooks” to the “Collection hooks” section.
23 changes: 13 additions & 10 deletions doc/en/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,19 @@ items, delete or otherwise amend the test items:
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.

Hooks for reporting about collection:

.. hook:: pytest_collectstart
.. autofunction:: pytest_collectstart
.. hook:: pytest_make_collect_report
.. autofunction:: pytest_make_collect_report
.. hook:: pytest_itemcollected
.. autofunction:: pytest_itemcollected
.. hook:: pytest_collectreport
.. autofunction:: pytest_collectreport
.. hook:: pytest_deselected
.. autofunction:: pytest_deselected

.. autofunction:: pytest_collection_finish

Test running (runtest) hooks
Expand Down Expand Up @@ -795,16 +808,6 @@ Reporting hooks

Session related reporting hooks:

.. hook:: pytest_collectstart
.. autofunction:: pytest_collectstart
.. hook:: pytest_make_collect_report
.. autofunction:: pytest_make_collect_report
.. hook:: pytest_itemcollected
.. autofunction:: pytest_itemcollected
.. hook:: pytest_collectreport
.. autofunction:: pytest_collectreport
.. hook:: pytest_deselected
.. autofunction:: pytest_deselected
.. hook:: pytest_report_header
.. autofunction:: pytest_report_header
.. hook:: pytest_report_collectionfinish
Expand Down