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
Simple exclusion filter for unittest autodiscovery #57685
Comments
|
unittest autodiscovery is very nice, but a '-x' option to specify directory patterns *not* to search could be a nice enhancement. (In my specific case, I want to run most of my tests, but one batch are Django tests and it would be nice to have an easy way to tell unittest to ignore them) |
|
This would be nice (more powerful) as a general test method exclusion filter: so run test discovery or fetch the specified test module / class and then exclude individual tests that match the pattern. We're looking to add a general test include filter, so it is the natural complement to that. |
|
I use netatalk so that I can edit my projects on my laptop (Mac) but run them on my server (Linux). Netatalk creates all kinds of .AppleDouble sub-directories that contain files with the same names as the parents, but generally hold icon, desktop location, and other meta information. When unittest tries to load this files, it generates a ValueError. I like using "python setup.py tests" on my pyramid projects, but this always fails the moment I look at a directory through my laptop (which creates the .AppleDouble subdirectory). A -x flag would be more useful if I could specify it on the "python setup.py tests" command line or in a config file or in an environment variable. I'm sure there are other software products that create hidden subdirectories that may contain file names that might confuse unittest. So I think a general mechanism rather than a specific one is a better solution. Also, it would be really nice if unittest printed the full path name of the file it was trying to import before spitting out the error -- it took a _lot_ of hunting and googling in order to understand what was going on. |
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment


ncoghlan commentedNov 25, 2011
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: