Skip to content

Commit 33804fd

Browse files
committed
doc/reference: move "Collection hooks" before "Test running hooks"
Collection occurs before test running, so it seems more logical.
1 parent da1124e commit 33804fd

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

doc/en/reference.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -644,28 +644,6 @@ Initialization hooks called for plugins and ``conftest.py`` files.
644644

645645
.. autofunction:: pytest_plugin_registered
646646

647-
Test running (runtest) hooks
648-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
649-
650-
All runtest related hooks receive a :py:class:`pytest.Item <_pytest.main.Item>` object.
651-
652-
.. autofunction:: pytest_runtestloop
653-
.. autofunction:: pytest_runtest_protocol
654-
.. autofunction:: pytest_runtest_logstart
655-
.. autofunction:: pytest_runtest_logfinish
656-
.. autofunction:: pytest_runtest_setup
657-
.. autofunction:: pytest_runtest_call
658-
.. autofunction:: pytest_runtest_teardown
659-
.. autofunction:: pytest_runtest_makereport
660-
661-
For deeper understanding you may look at the default implementation of
662-
these hooks in :py:mod:`_pytest.runner` and maybe also
663-
in :py:mod:`_pytest.pdb` which interacts with :py:mod:`_pytest.capture`
664-
and its input/output capturing in order to immediately drop
665-
into interactive debugging when a test failure occurs.
666-
667-
.. autofunction:: pytest_pyfunc_call
668-
669647
Collection hooks
670648
~~~~~~~~~~~~~~~~
671649

@@ -691,6 +669,28 @@ items, delete or otherwise amend the test items:
691669

692670
.. autofunction:: pytest_collection_finish
693671

672+
Test running (runtest) hooks
673+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
674+
675+
All runtest related hooks receive a :py:class:`pytest.Item <_pytest.main.Item>` object.
676+
677+
.. autofunction:: pytest_runtestloop
678+
.. autofunction:: pytest_runtest_protocol
679+
.. autofunction:: pytest_runtest_logstart
680+
.. autofunction:: pytest_runtest_logfinish
681+
.. autofunction:: pytest_runtest_setup
682+
.. autofunction:: pytest_runtest_call
683+
.. autofunction:: pytest_runtest_teardown
684+
.. autofunction:: pytest_runtest_makereport
685+
686+
For deeper understanding you may look at the default implementation of
687+
these hooks in :py:mod:`_pytest.runner` and maybe also
688+
in :py:mod:`_pytest.pdb` which interacts with :py:mod:`_pytest.capture`
689+
and its input/output capturing in order to immediately drop
690+
into interactive debugging when a test failure occurs.
691+
692+
.. autofunction:: pytest_pyfunc_call
693+
694694
Reporting hooks
695695
~~~~~~~~~~~~~~~
696696

0 commit comments

Comments
 (0)