lundi 25 avril 2016

Python: self.assertEqual(a, b, msg) --> I want diff AND msg

If I call it like this, I see a nice diff:

self.assertEqual(a, b)

If I call it like this, I see the msg only:

self.assertEqual(a, b, msg)

Is there an easy way to show the diff AND the msg?

Implementing assertEqual() myself would work, but I ask myself if this is really the best way.

Plattform: Python2.7 and pytest 2.6.2.

Aucun commentaire:

Enregistrer un commentaire