More detail when assert_image_similar fails

This commit is contained in:
wiredfool 2014-07-21 22:29:38 -07:00
parent d34fd8868b
commit ee4793a806

View File

@ -100,7 +100,7 @@ class PillowTestCase(unittest.TestCase):
ave_diff = float(diff)/(a.size[0]*a.size[1])
self.assertGreaterEqual(
epsilon, ave_diff,
msg or "average pixel value difference %.4f > epsilon %.4f" % (
(msg or '') + " average pixel value difference %.4f > epsilon %.4f" % (
ave_diff, epsilon))
def assert_warning(self, warn_class, func):