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 r.david.murray
Recipients mu_mind, r.david.murray
Date 2014-10-23.17:04:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414083898.07.0.404711176581.issue22710@psf.upfronthosting.co.za>
In-reply-to
Content
Not to 2.7, since that would be a new feature.

In Python we do not consider the content of an error message (as opposed to the exception class itself) to be part of the API, so it is not surprising that doctest does not really support checking it across versions.  That said, I agree that it would be nice to have.  If you want to propose a feature patch you can reopen the issue and update the title.

A workaround would be to capture the exception and display its str.  This would have the advantage of not cluttering your doctests with the Traceback lines, at the cost of having a try/except in your code sample.
History
Date User Action Args
2014-10-23 17:04:58r.david.murraysetrecipients: + r.david.murray, mu_mind
2014-10-23 17:04:58r.david.murraysetmessageid: <1414083898.07.0.404711176581.issue22710@psf.upfronthosting.co.za>
2014-10-23 17:04:58r.david.murraylinkissue22710 messages
2014-10-23 17:04:57r.david.murraycreate