c22df61a2b
- fix test for lossy webp alpha deviation of earlier lib versions OBS-URL: https://build.opensuse.org/request/show/284298 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pillow?expand=0&rev=27
18 lines
655 B
Diff
18 lines
655 B
Diff
diff --git a/Tests/test_file_webp_alpha.py b/Tests/test_file_webp_alpha.py
|
|
index 22c5c09..f316b71 100644
|
|
--- a/Tests/test_file_webp_alpha.py
|
|
+++ b/Tests/test_file_webp_alpha.py
|
|
@@ -83,7 +83,11 @@ class TestFileWebpAlpha(PillowTestCase):
|
|
image.load()
|
|
image.getdata()
|
|
|
|
- self.assert_image_similar(image, pil_image, 1.0)
|
|
+ # early versions of webp are known to produce higher deviations: deal with it
|
|
+ if _webp.WebPDecoderVersion(self) <= 0x201:
|
|
+ self.assert_image_similar(image, pil_image, 3.0)
|
|
+ else:
|
|
+ self.assert_image_similar(image, pil_image, 1.0)
|
|
|
|
|
|
if __name__ == '__main__':
|