@@ -323,7 +323,8 @@ def pytest_deselected(items: Sequence["Item"]) -> None:
323
323
324
324
@hookspec (firstresult = True )
325
325
def pytest_make_collect_report (collector : "Collector" ) -> "Optional[CollectReport]" :
326
- """Perform ``collector.collect()`` and return a CollectReport.
326
+ """Perform :func:`collector.collect() <pytest.Collector.collect>` and return
327
+ a :class:`~pytest.CollectReport`.
327
328
328
329
Stops at first non-None result, see :ref:`firstresult`.
329
330
"""
@@ -522,19 +523,19 @@ def pytest_runtest_teardown(item: "Item", nextitem: Optional["Item"]) -> None:
522
523
def pytest_runtest_makereport (
523
524
item : "Item" , call : "CallInfo[None]"
524
525
) -> Optional ["TestReport" ]:
525
- """Called to create a :py: class:`_pytest.reports .TestReport` for each of
526
+ """Called to create a :class:`~pytest .TestReport` for each of
526
527
the setup, call and teardown runtest phases of a test item.
527
528
528
529
See :func:`pytest_runtest_protocol` for a description of the runtest protocol.
529
530
530
- :param CallInfo[None] call: The `` CallInfo` ` for the phase.
531
+ :param call: The :class:`~pytest. CallInfo` for the phase.
531
532
532
533
Stops at first non-None result, see :ref:`firstresult`.
533
534
"""
534
535
535
536
536
537
def pytest_runtest_logreport (report : "TestReport" ) -> None :
537
- """Process the :py: class:`_pytest.reports .TestReport` produced for each
538
+ """Process the :class:`~pytest .TestReport` produced for each
538
539
of the setup, call and teardown runtest phases of an item.
539
540
540
541
See :func:`pytest_runtest_protocol` for a description of the runtest protocol.
@@ -555,7 +556,8 @@ def pytest_report_from_serializable(
555
556
config : "Config" ,
556
557
data : Dict [str , Any ],
557
558
) -> Optional [Union ["CollectReport" , "TestReport" ]]:
558
- """Restore a report object previously serialized with pytest_report_to_serializable()."""
559
+ """Restore a report object previously serialized with
560
+ :func:`pytest_report_to_serializable`."""
559
561
560
562
561
563
# -------------------------------------------------------------------------
@@ -753,7 +755,7 @@ def pytest_report_teststatus(
753
755
for example ``"rerun", "R", ("RERUN", {"yellow": True})``.
754
756
755
757
:param report: The report object whose status is to be returned.
756
- :param pytest.Config config: The pytest config object.
758
+ :param config: The pytest config object.
757
759
758
760
Stops at first non-None result, see :ref:`firstresult`.
759
761
"""
@@ -894,10 +896,10 @@ def pytest_exception_interact(
894
896
interactively handled.
895
897
896
898
May be called during collection (see :py:func:`pytest_make_collect_report`),
897
- in which case ``report`` is a :py: class:`_pytest.reports. CollectReport`.
899
+ in which case ``report`` is a :class:`CollectReport`.
898
900
899
901
May be called during runtest of an item (see :py:func:`pytest_runtest_protocol`),
900
- in which case ``report`` is a :py: class:`_pytest.reports. TestReport`.
902
+ in which case ``report`` is a :class:`TestReport`.
901
903
902
904
This hook is not called if the exception that was raised is an internal
903
905
exception like ``skip.Exception``.
0 commit comments