Return a Module collector or None for the given path. This hook will be called for each matching test module path. The pytest_collect_file hook needs to be used if you want to create test modules for files that do not match as a test module. Stops at first non-None result, see :ref
(
module_path: Path, path: "LEGACY_PATH", parent
)
| 337 | |
| 338 | @hookspec(firstresult=True) |
| 339 | def pytest_pycollect_makemodule( |
| 340 | module_path: Path, path: "LEGACY_PATH", parent |
| 341 | ) -> Optional["Module"]: |
| 342 | """Return a Module collector or None for the given path. |
| 343 | |
| 344 | This hook will be called for each matching test module path. |
| 345 | The pytest_collect_file hook needs to be used if you want to |
| 346 | create test modules for files that do not match as a test module. |
| 347 | |
| 348 | Stops at first non-None result, see :ref:`firstresult`. |
| 349 | |
| 350 | :param pathlib.Path module_path: The path of the module to collect. |
| 351 | :param LEGACY_PATH path: The path of the module to collect (deprecated). |
| 352 | |
| 353 | .. versionchanged:: 7.0.0 |
| 354 | The ``module_path`` parameter was added as a :class:`pathlib.Path` |
| 355 | equivalent of the ``path`` parameter. |
| 356 | |
| 357 | The ``path`` parameter has been deprecated in favor of ``fspath``. |
| 358 | """ |
| 359 | |
| 360 | |
| 361 | @hookspec(firstresult=True) |
nothing calls this directly
no outgoing calls
no test coverage detected