The following hooks now receive an additional pathlib.Path
argument, equivalent to an existing py.path.local
argument:
- :func:`pytest_ignore_collect <_pytest.hookspec.pytest_ignore_collect>` - The
fspath
parameter (equivalent to existingpath
parameter). - :func:`pytest_collect_file <_pytest.hookspec.pytest_collect_file>` - The
fspath
parameter (equivalent to existingpath
parameter). - :func:`pytest_pycollect_makemodule <_pytest.hookspec.pytest_pycollect_makemodule>` - The
fspath
parameter (equivalent to existingpath
parameter). - :func:`pytest_report_header <_pytest.hookspec.pytest_report_header>` - The
startpath
parameter (equivalent to existingstartdir
parameter). - :func:`pytest_report_collectionfinish <_pytest.hookspec.pytest_report_collectionfinish>` - The
startpath
parameter (equivalent to existingstartdir
parameter).
Note
The name of the Node
arguments and attributes (old fspath
, new path
) is the opposite
of the situation for hooks (old path
, new fspath
).
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).