(
file_path: Path,
parent: Collector,
)
| 124 | |
| 125 | |
| 126 | def pytest_collect_file( |
| 127 | file_path: Path, |
| 128 | parent: Collector, |
| 129 | ) -> DoctestModule | DoctestTextfile | None: |
| 130 | config = parent.config |
| 131 | if file_path.suffix == ".py": |
| 132 | if config.option.doctestmodules and not any( |
| 133 | (_is_setup_py(file_path), _is_main_py(file_path)) |
| 134 | ): |
| 135 | return DoctestModule.from_parent(parent, path=file_path) |
| 136 | elif _is_doctest(config, file_path, parent): |
| 137 | return DoctestTextfile.from_parent(parent, path=file_path) |
| 138 | return None |
| 139 | |
| 140 | |
| 141 | def _is_setup_py(path: Path) -> bool: |
nothing calls this directly
no test coverage detected