Don't print the entire image as bytes on failure

This commit is contained in:
wiredfool 2014-06-29 14:39:32 -07:00
parent 8534e67546
commit 2d13166667

View File

@ -92,9 +92,8 @@ class PillowTestCase(unittest.TestCase):
self.assertEqual(
a.size, b.size,
msg or "got size %r, expected %r" % (a.size, b.size))
self.assertEqual(
a.tobytes(), b.tobytes(),
msg or "got different content")
if a.tobytes() != b.tobytes():
self.fail(msg or "got different content")
def assert_image_similar(self, a, b, epsilon, msg=None):
epsilon = float(epsilon)