Skip to content

Add a directory whitelist option #694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pytestbot opened this issue Mar 8, 2015 · 2 comments
Closed

Add a directory whitelist option #694

pytestbot opened this issue Mar 8, 2015 · 2 comments
Labels
type: enhancement new feature or API change, should be merged into features branch

Comments

@pytestbot
Copy link
Contributor

Originally reported by: BitBucket: thiefmaster, GitHub: thiefmaster


Right now you can only blacklist directories using norecursedirs. However, especially in larger projects, it might be much nicer to simply whitelist the folders where you know that there are or might be tests.

Another advantage of this would be avoiding collisions with people creating virtualenvs e.g. in projectfolder/env (personally I always add env* to norecursedirs, but what if someone uses a different folder for his environment?).

Actually, it might make sense if pytest detected virtualenv folders and automatically skipped them...


@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


I agree that whitelisting would make sense, i've often wished myself it was there -- it probably needs to be overridable when files are specified directly via the command line, though.

@pytestbot
Copy link
Contributor Author

Original comment by BitBucket: thiefmaster, GitHub: thiefmaster:


I agree. Specifying a folder or file manually should always override the
whitelist.

@pytestbot pytestbot added the type: enhancement new feature or API change, should be merged into features branch label Jun 15, 2015
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 9, 2015
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 9, 2015
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 9, 2015
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 9, 2015
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 10, 2015
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

1 participant