New submission from Chris Jerdonek <chris.jerdo...@gmail.com>: 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. ---------- components: Library (Lib) keywords: easy messages: 163386 nosy: cjerdonek priority: normal severity: normal status: open title: Let unittest.TestProgram()'s defaultTest argument be a list type: enhancement versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15132> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com