(
self, fspath: Path, handle_dupes: bool = True
)
| 565 | return True |
| 566 | |
| 567 | def _collectfile( |
| 568 | self, fspath: Path, handle_dupes: bool = True |
| 569 | ) -> Sequence[nodes.Collector]: |
| 570 | assert ( |
| 571 | fspath.is_file() |
| 572 | ), "{!r} is not a file (isdir={!r}, exists={!r}, islink={!r})".format( |
| 573 | fspath, fspath.is_dir(), fspath.exists(), fspath.is_symlink() |
| 574 | ) |
| 575 | ihook = self.gethookproxy(fspath) |
| 576 | if not self.isinitpath(fspath): |
| 577 | if ihook.pytest_ignore_collect(collection_path=fspath, config=self.config): |
| 578 | return () |
| 579 | |
| 580 | if handle_dupes: |
| 581 | keepduplicates = self.config.getoption("keepduplicates") |
| 582 | if not keepduplicates: |
| 583 | duplicate_paths = self.config.pluginmanager._duplicatepaths |
| 584 | if fspath in duplicate_paths: |
| 585 | return () |
| 586 | else: |
| 587 | duplicate_paths.add(fspath) |
| 588 | |
| 589 | return ihook.pytest_collect_file(file_path=fspath, parent=self) # type: ignore[no-any-return] |
| 590 | |
| 591 | @overload |
| 592 | def perform_collect( |
no test coverage detected