-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
-k expression ignores directory paths #14218
Copy link
Copy link
Open
Labels
topic: selectionrelated to test selection from the command linerelated to test selection from the command linetype: 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
Metadata
Metadata
Assignees
Labels
topic: selectionrelated to test selection from the command linerelated to test selection from the command linetype: 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
The
-kexpression does not work with directory paths. For example,pytest -k '/common'does not collect any tests from the/commonfolder.pip listfrom the virtual environment you are usingMacOS 26.2 (25C56)
pytest 9.0.2
Files tree:
└── tests
├── common
│ └── test_common.py
├── desktop
│ └── test_desktop.py
└── mobile
└── mobile_test.py
Outputs: