()
| 387 | |
| 388 | def pytest_make_collect_report(collector: Collector) -> CollectReport: |
| 389 | def collect() -> list[Item | Collector]: |
| 390 | # Before collecting, if this is a Directory, load the conftests. |
| 391 | # If a conftest import fails to load, it is considered a collection |
| 392 | # error of the Directory collector. This is why it's done inside of the |
| 393 | # CallInfo wrapper. |
| 394 | # |
| 395 | # Note: initial conftests are loaded early, not here. |
| 396 | if isinstance(collector, Directory): |
| 397 | collector.config.pluginmanager._loadconftestmodules( |
| 398 | collector.path, |
| 399 | collector.config.getoption("importmode"), |
| 400 | rootpath=collector.config.rootpath, |
| 401 | consider_namespace_packages=collector.config.getini( |
| 402 | "consider_namespace_packages" |
| 403 | ), |
| 404 | ) |
| 405 | |
| 406 | return list(collector.collect()) |
| 407 | |
| 408 | call = CallInfo.from_call( |
| 409 | collect, "collect", reraise=(KeyboardInterrupt, SystemExit) |
nothing calls this directly
no test coverage detected