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