This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年11月25日 01:57 by ncoghlan, last changed 2022年04月11日 14:57 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg148299 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2011年11月25日 01:57 | |
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) |
|||
| msg155469 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2012年03月12日 20:02 | |
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. |
|||
| msg158500 - (view) | Author: Gustavo Arzola (gustavoarzola) | Date: 2012年04月16日 21:15 | |
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. |
|||
| msg158676 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年04月18日 22:18 | |
> A -x flag would be more useful if I could specify it on the "python setup.py tests" command line The most common distutils test command is part of setuptools, not the standard library. Other people have also written other test, tests or nosetests commands. The only test command in the standard library is in packaging (distutils2), so you could open another bug report to request a new option for "pysetup run test", which would simply pass the option to unittest. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:24 | admin | set | github: 57685 |
| 2012年09月30日 23:52:57 | michael.foord | set | assignee: michael.foord |
| 2012年09月30日 10:24:12 | tomwardill | set | versions: + Python 3.4, - Python 3.3 |
| 2012年04月18日 22:18:48 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg158676 versions: - Python 2.7 |
| 2012年04月16日 21:15:43 | gustavoarzola | set | nosy:
+ gustavoarzola messages: + msg158500 versions: + Python 2.7 |
| 2012年03月12日 20:02:52 | michael.foord | set | messages: + msg155469 |
| 2011年11月25日 01:57:24 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2011年11月25日 01:57:02 | ncoghlan | create | |