-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add srcpaths setting #9114
Copy link
Copy link
Closed
Labels
status: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: collectionrelated to the collection phaserelated to the collection phasetype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: 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
status: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: collectionrelated to the collection phaserelated to the collection phasetype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: 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
What's the problem this feature will solve?
pytest seems designed to test Python packages.
However, it's getting used to test applications as well.
The main problem with testing applications is telling pytest how to find the code under test.
Specifically,
sys.pathneeds modified to include the directory where the code under test lives.Describe the solution you'd like
I'd like a
srcpathssetting. We already havetestpaths.srcpathswould be a list of directories to add tosys.path.Any project that isn't an installable package (installable through pip) that wants the source code and test code in different directories needs this.
Alternative Solutions
Additional context