2020-12-15 00:16:14 +08:00
|
|
|
The following hooks now receive an additional ``pathlib.Path`` argument, equivalent to an existing ``py.path.local`` argument:
|
|
|
|
|
2021-12-03 20:14:09 +08:00
|
|
|
- :func:`pytest_ignore_collect <_pytest.hookspec.pytest_ignore_collect>` - The ``collection_path`` parameter (equivalent to existing ``path`` parameter).
|
|
|
|
- :func:`pytest_collect_file <_pytest.hookspec.pytest_collect_file>` - The ``file_path`` parameter (equivalent to existing ``path`` parameter).
|
|
|
|
- :func:`pytest_pycollect_makemodule <_pytest.hookspec.pytest_pycollect_makemodule>` - The ``module_path`` parameter (equivalent to existing ``path`` parameter).
|
|
|
|
- :func:`pytest_report_header <_pytest.hookspec.pytest_report_header>` - The ``start_path`` parameter (equivalent to existing ``startdir`` parameter).
|
|
|
|
- :func:`pytest_report_collectionfinish <_pytest.hookspec.pytest_report_collectionfinish>` - The ``start_path`` parameter (equivalent to existing ``startdir`` parameter).
|
2021-12-06 18:25:05 +08:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
The name of the :class:`~_pytest.nodes.Node` arguments and attributes (the
|
|
|
|
new attribute being ``path``) is **the opposite** of the situation for hooks
|
|
|
|
(the old argument being ``path``).
|
|
|
|
|
|
|
|
This is an unfortunate artifact due to historical reasons, which should be
|
|
|
|
resolved in future versions as we slowly get rid of the :pypi:`py`
|
|
|
|
dependency (see :issue:`9283` for a longer discussion).
|