Summary: | dev-python/pillow-5.4.1: fails TestImageGetExtrema.test_extrema, TestFileWebpAnimation.test_write_animation_L | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ernsteiswuerfel <erhard_f> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | python |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | Linux | ||
URL: | https://github.com/python-pillow/Pillow/issues/3927 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
emerge --info |
Description
ernsteiswuerfel
2019-03-14 18:07:13 UTC
Created attachment 569104 [details]
emerge --info
=============================================== FAILURES =============================================== _____________________________ TestFileWebpAnimation.test_write_animation_L _____________________________ self = <test_file_webp_animated.TestFileWebpAnimation testMethod=test_write_animation_L> def test_write_animation_L(self): """ Convert an animated GIF to animated WebP, then compare the frame count, and first and last frames to ensure they're visually similar. """ orig = Image.open("Tests/images/iss634.gif") self.assertGreater(orig.n_frames, 1) temp_file = self.tempfile("temp.webp") orig.save(temp_file, save_all=True) im = Image.open(temp_file) self.assertEqual(im.n_frames, orig.n_frames) # Compare first and last frames to the original animated GIF orig.load() im.load() self.assert_image_similar(im, orig.convert("RGBA"), 25.0) orig.seek(orig.n_frames-1) im.seek(im.n_frames-1) orig.load() im.load() > self.assert_image_similar(im, orig.convert("RGBA"), 25.0) Tests/test_file_webp_animated.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <test_file_webp_animated.TestFileWebpAnimation testMethod=test_write_animation_L> a = <PIL.WebPImagePlugin.WebPImageFile image mode=RGBA size=245x245 at 0xF42A6370> b = <PIL.Image.Image image mode=RGBA size=245x245 at 0xF428FFB0>, epsilon = 25.0, msg = None def assert_image_similar(self, a, b, epsilon, msg=None): epsilon = float(epsilon) self.assertEqual( a.mode, b.mode, msg or "got mode %r, expected %r" % (a.mode, b.mode)) self.assertEqual( a.size, b.size, msg or "got size %r, expected %r" % (a.size, b.size)) a, b = convert_to_comparable(a, b) diff = 0 for ach, bch in zip(a.split(), b.split()): chdiff = ImageMath.eval("abs(a - b)", a=ach, b=bch).convert('L') diff += sum(i * num for i, num in enumerate(chdiff.histogram())) ave_diff = float(diff)/(a.size[0]*a.size[1]) try: self.assertGreaterEqual( epsilon, ave_diff, (msg or '') + " average pixel value difference %.4f > epsilon %.4f" % ( ave_diff, epsilon)) except Exception as e: if HAS_UPLOADER: try: url = test_image_results.upload(a, b) logger.error("Url for test images: %s" % url) except Exception: pass > raise e E AssertionError: average pixel value difference 57.5169 > epsilon 25.0000 Tests/helper.py:154: AssertionError Reopen if this persists on 6 |