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
This commit is contained in:
parent
a8109a78fd
commit
c22df61a2b
17
Pillow-fixtests.patch
Normal file
17
Pillow-fixtests.patch
Normal file
@ -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__':
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user