From c22df61a2b1df762488faa3f09a1b179893ef9206cfba7a9648c9e1a7afe8c29 Mon Sep 17 00:00:00 2001 From: Denisart Benjamin Date: Mon, 9 Feb 2015 15:17:57 +0000 Subject: [PATCH] Accepting request 284298 from home:frispete:python - 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 --- Pillow-fixtests.patch | 17 +++++++++++++++++ python-Pillow.changes | 5 +++++ python-Pillow.spec | 2 ++ series | 1 + 4 files changed, 25 insertions(+) create mode 100644 Pillow-fixtests.patch create mode 100644 series 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..30be03a 100644 --- a/python-Pillow.changes +++ b/python-Pillow.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 6 08:25:34 UTC 2015 - hpj@urpla.net + +- fix test for lossy webp alpha deviation of earlier lib versions + ------------------------------------------------------------------- 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 diff --git a/series b/series new file mode 100644 index 0000000..d385ecd --- /dev/null +++ b/series @@ -0,0 +1 @@ +Pillow-fixtests.patch