Return a string or list of strings to be displayed as header info for terminal reporting. :param pytest.Config config: The pytest config object. :param Path start_path: The starting dir. :param LEGACY_PATH startdir: The starting dir (deprecated). .. note:: Lines returned b
(
config: "Config", start_path: Path, startdir: "LEGACY_PATH"
)
| 674 | |
| 675 | |
| 676 | def pytest_report_header( |
| 677 | config: "Config", start_path: Path, startdir: "LEGACY_PATH" |
| 678 | ) -> Union[str, List[str]]: |
| 679 | """Return a string or list of strings to be displayed as header info for terminal reporting. |
| 680 | |
| 681 | :param pytest.Config config: The pytest config object. |
| 682 | :param Path start_path: The starting dir. |
| 683 | :param LEGACY_PATH startdir: The starting dir (deprecated). |
| 684 | |
| 685 | .. note:: |
| 686 | |
| 687 | Lines returned by a plugin are displayed before those of plugins which |
| 688 | ran before it. |
| 689 | If you want to have your line(s) displayed first, use |
| 690 | :ref:`trylast=True <plugin-hookorder>`. |
| 691 | |
| 692 | .. note:: |
| 693 | |
| 694 | This function should be implemented only in plugins or ``conftest.py`` |
| 695 | files situated at the tests root directory due to how pytest |
| 696 | :ref:`discovers plugins during startup <pluginorder>`. |
| 697 | |
| 698 | .. versionchanged:: 7.0.0 |
| 699 | The ``start_path`` parameter was added as a :class:`pathlib.Path` |
| 700 | equivalent of the ``startdir`` parameter. The ``startdir`` parameter |
| 701 | has been deprecated. |
| 702 | """ |
| 703 | |
| 704 | |
| 705 | def pytest_report_collectionfinish( |
nothing calls this directly
no outgoing calls
no test coverage detected