[Python-ideas] unittest: assertEqual(a, b, msg): Show diff AND msg
Gregory P. Smith
greg at krypto.org
Mon Apr 25 13:35:10 EDT 2016
On Mon, Apr 25, 2016 at 12:47 AM Thomas Güttler <
guettliml at thomas-guettler.de> wrote:
> Up to now assertEqual(a, b, msg) outputs only the msg, not the diff.
> I know that setting longMessage to True shows the diff and the msg
> I think the sane default is to show the diff and the message for
> What do you think?
longMessage already defaults to True in Python 3.
Changing the default in a future Python 2.7.xx release is unlikely as that
kind of change can catch people by surprise and cause problems in the
middle of a stable release.
Setting it to true manually in all your 2.x code? recommended!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas