Issue 5989: unittest.TestLoader.loadTestsFromNames should accept module / class name (original) (raw)
Issue5989
Created on 2009-05-10 20:04 by michael.foord, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (2) | ||
---|---|---|
msg87540 - (view) | Author: Michael Foord (michael.foord) * ![]() |
Date: 2009-05-10 20:04 |
It would be really nice if unittest.TestLoader.loadTestsFromNames accepted module and class names. My main motivation for that is so that I can do: python -m unittest module_name There is no backwards compatibility issue as currently this doesn't work... Really easy to add. | ||
msg87555 - (view) | Author: Michael Foord (michael.foord) * ![]() |
Date: 2009-05-10 23:08 |
Actually they do - it is an obscure bug in the way the module is specified in TestProgram that prevents this from working. The code in parseArgs that is currently: if len(args) > 0: self.testNames = args Should probably be: if len(args) > 0: self.testNames = args self.module = None Anyway - I'll report and fix that as a separate issue. :-) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:48 | admin | set | github: 50239 |
2009-05-10 23:08:15 | michael.foord | set | status: open -> closedresolution: works for memessages: + |
2009-05-10 20:04:19 | michael.foord | create |