homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2012年10月23日 18:14:45chris.jerdoneksetrecipients: + chris.jerdonek, ezio.melotti, michael.foord, nailor, petri.lehtinen
2012年10月23日 18:14:45chris.jerdoneksetmessageid: <1351016085.59.0.173066663848.issue15132@psf.upfronthosting.co.za>
2012年10月23日 18:14:45chris.jerdoneklinkissue15132 messages
2012年10月23日 18:14:45chris.jerdonekcreate

AltStyle によって変換されたページ (->オリジナル) /