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 Julian
Recipients Julian, michael.foord
Date 2012-09-09.19:08:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347217684.87.0.845437270023.issue15891@psf.upfronthosting.co.za>
In-reply-to
Content
Can `__unittest = True`, which is used to hide stack frames from tracebacks inside the testing framework, be documented as being public, or, if that's not acceptable, be replaced by something that is? `_exc_info_to_string` is a hairy function to need to rewrite when authoring a testing framework, but it's a rather common thing to want, and would be nice if it was easily done by integrating with what `TestCase` is already doing.

It's also (with or without formal blessing) being used in the wild in at least one place I know of here http://bazaar.launchpad.net/~testtools-committers/testtools/trunk/view/head:/testtools/testcase.py#L798  and since it's not terribly critical and will fail rather nicely even if the API changes suddenly I'd bet other places are using it too, though I haven't bothered to check.

See also http://twistedmatrix.com/trac/ticket/4127  which would be easier to implement if this were acceptable to use for external code.
History
Date User Action Args
2012-09-09 19:08:04Juliansetrecipients: + Julian, michael.foord
2012-09-09 19:08:04Juliansetmessageid: <1347217684.87.0.845437270023.issue15891@psf.upfronthosting.co.za>
2012-09-09 19:08:04Julianlinkissue15891 messages
2012-09-09 19:08:03Juliancreate