From 132f9f3609c68c0d62ddc4980143871b7fa949e3 Mon Sep 17 00:00:00 2001 From: ketpatil77 Date: Mon, 19 Oct 2026 16:13:57 +0530 Subject: [PATCH] docs: list collection hooks under collection section --- doc/en/reference/reference.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index 4e0f40f4f93..f19d9741979 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -724,6 +724,17 @@ Initialization hooks called for plugins and ``conftest.py`` files. Collection 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 + ``pytest`` calls the following hooks for collecting files and directories: .. hook:: pytest_collection @@ -805,16 +816,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