From ff417ceaacbd0c959ac009b7ed4ded2cb9d1dee0 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sun, 26 Jan 2014 20:36:01 -0800 Subject: [PATCH] (supported) good bmps all pass --- Tests/bmpsuite.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/bmpsuite.py b/Tests/bmpsuite.py index 337751a94..d3b7f00c8 100644 --- a/Tests/bmpsuite.py +++ b/Tests/bmpsuite.py @@ -65,20 +65,20 @@ def test_good(): for f in get_files('g'): try: - print '.' + print '.', #print ("Trying %s"%f) im = Image.open(f) #print ("%s, %s" %(im.size, im.mode)) im.load() compare = Image.open(get_compare(f)) compare.load() - im = im.convert(compare.mode) - #print ("%s, %s" %(compare.size, compare.mode)) - if not assert_image_similar(im, compare,10): - print (f) - im.show() - compare.show() - sys.exit() + if im.mode == 'P': + # assert image similar doesn't really work + # with paletized image, since the palette might + # be differently ordered for an equivalent image. + im = im.convert('RGBA') + compare = im.convert('RGBA') + assert_image_similar(im, compare,5) except Exception as msg: