-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
Currently the two recursive collectors Session and Package perform the norecursedir check directly in the collector:
Lines 566 to 568 in 85c5bd2
| norecursepatterns = self.config.getini("norecursedirs") | |
| if any(fnmatch_ex(pat, fspath) for pat in norecursepatterns): | |
| return False |
Lines 709 to 711 in 85c5bd2
| norecursepatterns = self.config.getini("norecursedirs") | |
| if any(fnmatch_ex(pat, fspath) for pat in norecursepatterns): | |
| return False |
I think it would be strictly better to move this check to main's pytest_ignore_collect hookimpl:
- Less duplication
- Better decoupling -- only main knows about the option it defines
- More control for plugins
Metadata
Metadata
Assignees
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature