Message173628
| Author |
chris.jerdonek |
| Recipients |
chris.jerdonek, ezio.melotti, michael.foord, nailor, petri.lehtinen |
| Date |
2012年10月23日.18:14:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1351016085.59.0.173066663848.issue15132@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|