Message163386
It would be nice if unittest.TestProgram(), aka unittest.main(), allowed one to set self.testNames by programmatically passing in a list of test names.
Currently, unittest.main() almost allows this: the constructor sets self.testNames to a 1-tuple containing the value of the defaultTest argument. But defaultTest can only be a string, not a list of test names.
A way around this is to pass the test names explicitly via the argv argument, but this seems less elegant as a programmatic API. Moreover, this approach isn't equivalent because test names passed via argv first get passed to a _convert_names() function.
It seems like it would be a natural and simple change to enhance unittest.TestProgram() to accept not just a name but also a list of names for the defaultTest argument. Thanks. |
|
Date |
User |
Action |
Args |
2012-06-22 08:25:30 | chris.jerdonek | set | recipients:
+ chris.jerdonek |
2012-06-22 08:25:30 | chris.jerdonek | set | messageid: <1340353530.68.0.240528814016.issue15132@psf.upfronthosting.co.za> |
2012-06-22 08:25:29 | chris.jerdonek | link | issue15132 messages |
2012-06-22 08:25:28 | chris.jerdonek | create | |
|