Message173628
Thanks for the patch.
- self.testNames = (self.defaultTest,)
+ if isinstance(self.defaultTest, str):
+ self.testNames = (self.defaultTest,)
+ else:
+ self.testNames = tuple(self.defaultTest)
Is there any reason this is a tuple instead of a list? A list would be more flexible. In contrast, the _convert_names() function used in this line of code sets self.testNames to be a list of test names:
self.testNames = _convert_names(args)
(from http://hg.python.org/cpython/file/8576bf1c0302/Lib/unittest/main.py#l161 )
By the way, this can only go into Python 3.4 as it is an enhancement. |
|
Date |
User |
Action |
Args |
2012-10-23 18:14:45 | chris.jerdonek | set | recipients:
+ chris.jerdonek, ezio.melotti, michael.foord, nailor, petri.lehtinen |
2012-10-23 18:14:45 | chris.jerdonek | set | messageid: <1351016085.59.0.173066663848.issue15132@psf.upfronthosting.co.za> |
2012-10-23 18:14:45 | chris.jerdonek | link | issue15132 messages |
2012-10-23 18:14:45 | chris.jerdonek | create | |
|