From 99aec33aafa5db024e3bf6a2e173bf7df6266e42db099b0be341ce21eb356e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 18 Jan 2019 10:17:21 +0000 Subject: [PATCH] - Add patch to fix tests with new PIL (due to ordering there were 2 png returns and randomly on py2 it could return apng instead of just png: * pil-fix-test.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pilkit?expand=0&rev=6 --- pil-fix-test.patch | 13 +++++++++++++ python-pilkit.changes | 8 ++++++++ python-pilkit.spec | 4 +++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pil-fix-test.patch diff --git a/pil-fix-test.patch b/pil-fix-test.patch new file mode 100644 index 0000000..f06fecb --- /dev/null +++ b/pil-fix-test.patch @@ -0,0 +1,13 @@ +Index: pilkit-2.0/tests/test_utils.py +=================================================================== +--- pilkit-2.0.orig/tests/test_utils.py ++++ pilkit-2.0/tests/test_utils.py +@@ -16,7 +16,7 @@ def test_extension_to_format(): + + + def test_format_to_extension_no_init(): +- eq_(format_to_extension('PNG'), '.png') ++ eq_(format_to_extension('GIF'), '.gif') + eq_(format_to_extension('ICO'), '.ico') + + diff --git a/python-pilkit.changes b/python-pilkit.changes index 16a6637..f685d28 100644 --- a/python-pilkit.changes +++ b/python-pilkit.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jan 18 10:15:40 UTC 2019 - Tomáš Chvátal + +- Add patch to fix tests with new PIL (due to ordering there were + 2 png returns and randomly on py2 it could return apng instead + of just png: + * pil-fix-test.patch + ------------------------------------------------------------------- Tue Dec 4 12:51:33 UTC 2018 - Matej Cepl diff --git a/python-pilkit.spec b/python-pilkit.spec index a8838f2..b70337c 100644 --- a/python-pilkit.spec +++ b/python-pilkit.spec @@ -1,7 +1,7 @@ # # spec file for package python-pilkit # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: http://github.com/matthewwithanm/pilkit/ Source: https://files.pythonhosted.org/packages/source/p/pilkit/pilkit-%{version}.tar.gz +Patch0: pil-fix-test.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -49,6 +50,7 @@ interface for performing manipulations on PIL images. %prep %setup -q -n pilkit-%{version} +%patch0 -p1 %build %python_build