(
file_path: Path,
parent: Collector,
)
| 131 | |
| 132 | |
| 133 | def pytest_collect_file( |
| 134 | file_path: Path, |
| 135 | parent: Collector, |
| 136 | ) -> Optional[Union["IPDoctestModule", "IPDoctestTextfile"]]: |
| 137 | config = parent.config |
| 138 | if file_path.suffix == ".py": |
| 139 | if config.option.ipdoctestmodules and not any( |
| 140 | (_is_setup_py(file_path), _is_main_py(file_path)) |
| 141 | ): |
| 142 | mod: IPDoctestModule = IPDoctestModule.from_parent(parent, path=file_path) |
| 143 | return mod |
| 144 | elif _is_ipdoctest(config, file_path, parent): |
| 145 | txt: IPDoctestTextfile = IPDoctestTextfile.from_parent(parent, path=file_path) |
| 146 | return txt |
| 147 | return None |
| 148 | |
| 149 | |
| 150 | if pytest_version[0] < 7: |
nothing calls this directly
no test coverage detected
searching dependent graphs…