R. David Murray added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to