Many places in Python use the repr()
of an object instead of the str()
as the repr()
usually specifies one exact instance.
If you want to see the actual str()
instead, many assertWhatever methods allow a custom error message:
assertEqual(my_obj1, my_obj2, '%s != %s' % (my_obj1, my_obj2))