(config: Config, path: Path, parent: Collector)
| 146 | |
| 147 | |
| 148 | def _is_doctest(config: Config, path: Path, parent: Collector) -> bool: |
| 149 | if path.suffix in (".txt", ".rst") and parent.session.isinitpath(path): |
| 150 | return True |
| 151 | globs = config.getoption("doctestglob") or ["test*.txt"] |
| 152 | return any(fnmatch_ex(glob, path) for glob in globs) |
| 153 | |
| 154 | |
| 155 | def _is_main_py(path: Path) -> bool: |
no test coverage detected