diff --git a/Pillow-fixtests.patch b/Pillow-fixtests.patch new file mode 100644 index 0000000..27b3b8e --- /dev/null +++ b/Pillow-fixtests.patch @@ -0,0 +1,17 @@ +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__': diff --git a/python-Pillow.changes b/python-Pillow.changes index 3d35afc..2b51e3c 100644 --- a/python-Pillow.changes +++ b/python-Pillow.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 6 08:25:34 UTC 2015 - hpj@urpla.net + +- fix test for lossy webp alpha deviation of earlier lib versions + * Add Pillow-fixtests.patch + ------------------------------------------------------------------- Thu Jan 8 10:55:04 UTC 2015 - tbechtold@suse.com diff --git a/python-Pillow.spec b/python-Pillow.spec index 20f9b1d..dd8f03f 100644 --- a/python-Pillow.spec +++ b/python-Pillow.spec @@ -24,6 +24,7 @@ License: HPND Group: Development/Languages/Python Url: http://python-imaging.github.io/ Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz +Patch: Pillow-fixtests.patch BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-tk @@ -85,6 +86,7 @@ Python Imaging Library by Fredrik Lundh and Contributors. %prep %setup -q -n Pillow-%{version} +%patch -p1 %build python setup.py build