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 rbcollins
Recipients michael.foord, rbcollins
Date 2012-10-19.18:34:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za>
In-reply-to
Content
TextTestRunner calls str(TestCase) directly, which makes it hard for testscenarios to rename the test cases as it parameterises them (because __str__ is a descriptor). While testscenarios could use a decorator instead, thats undesirable as the test case object would still need to be customised so that calls to self.id() and self.shortDescription() inside it still return consistent information.

So the relevant code is this:
 def getDescription(self, test):
41 if self.descriptions:
42 return test.shortDescription() or str(test)
43 else:
44 return str(test)

What I'd like is to have this be something like:
41 if self.descriptions:
42     return test.shortDescription() or test.id()
43 else:
44     return test.id()

Which would let testscenarios adjust both shortDescriptions and id, and Just Work.
History
Date User Action Args
2012-10-19 18:34:49rbcollinssetrecipients: + rbcollins, michael.foord
2012-10-19 18:34:49rbcollinssetmessageid: <1350671689.29.0.0409273215418.issue16288@psf.upfronthosting.co.za>
2012-10-19 18:34:49rbcollinslinkissue16288 messages
2012-10-19 18:34:49rbcollinscreate