Merge pull request #4622 from hugovk/fix-string

Fix broken string in test error message
This commit is contained in:
Andrew Murray 2020-05-13 21:19:57 +10:00 committed by GitHub
commit 96f2ef1426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,8 +174,10 @@ def assert_compare_images(a, b, max_average_diff, max_diff=255):
average_diff = sum(i * num for i, num in enumerate(ch_hist)) / (
a.size[0] * a.size[1]
)
msg = "average pixel value difference {:.4f} > expected {:.4f} "
"for '{}' band".format(average_diff, max_average_diff, band)
msg = (
"average pixel value difference {:.4f} > expected {:.4f} "
"for '{}' band".format(average_diff, max_average_diff, band)
)
assert max_average_diff >= average_diff, msg
last_diff = [i for i, num in enumerate(ch_hist) if num > 0][-1]