Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pilkit for openSUSE:Factory checked in at 2021-09-06 15:58:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pilkit (Old) and /work/SRC/openSUSE:Factory/.python-pilkit.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pilkit" Mon Sep 6 15:58:06 2021 rev:5 rq:917009 version:2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pilkit/python-pilkit.changes 2021-06-02 22:11:52.436151071 +0200 +++ /work/SRC/openSUSE:Factory/.python-pilkit.new.1899/python-pilkit.changes 2021-09-06 15:58:20.629290860 +0200 @@ -1,0 +2,6 @@ +Mon Sep 6 08:44:11 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com> + +- Add switch-to-pytest.patch: + * Switch to using pytest, rather than nose. + +------------------------------------------------------------------- New: ---- switch-to-pytest.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pilkit.spec ++++++ --- /var/tmp/diff_new_pack.4jkXXe/_old 2021-09-06 15:58:21.233290721 +0200 +++ /var/tmp/diff_new_pack.4jkXXe/_new 2021-09-06 15:58:21.233290721 +0200 @@ -22,11 +22,10 @@ Release: 0 Summary: A collection of utilities and processors for the Python Imaging Libary License: BSD-3-Clause -Group: Development/Languages/Python URL: https://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 pytest} +Patch1: switch-to-pytest.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -34,8 +33,7 @@ # SECTION test requirements BuildRequires: %{python_module Pillow} BuildRequires: %{python_module mock >= 1.0.1} -BuildRequires: %{python_module nose >= 1.3.6} -BuildRequires: %{python_module nose-progressive >= 1.5.1} +BuildRequires: %{python_module pytest} # /SECTION %python_subpackages @@ -48,7 +46,7 @@ %prep %setup -q -n pilkit-%{version} -%patch0 -p1 +%autopatch -p1 %build %python_build ++++++ switch-to-pytest.patch ++++++ Index: pilkit-2.0/tests/test_processors.py =================================================================== --- pilkit-2.0.orig/tests/test_processors.py +++ pilkit-2.0/tests/test_processors.py @@ -1,10 +1,9 @@ from pilkit.lib import Image, ImageDraw, ImageColor from pilkit.processors import (Resize, ResizeToFill, ResizeToFit, SmartCrop, SmartResize, MakeOpaque, ColorOverlay) -from nose.tools import eq_, assert_true import os from pilkit.processors.resize import Thumbnail -from .utils import create_image +from .utils import create_image, eq_, assert_true import mock Index: pilkit-2.0/tests/test_utils.py =================================================================== --- pilkit-2.0.orig/tests/test_utils.py +++ pilkit-2.0/tests/test_utils.py @@ -4,10 +4,10 @@ from pilkit.exceptions import UnknownFor from pilkit.lib import Image from pilkit.utils import (extension_to_format, format_to_extension, FileWrapper, save_image, prepare_image, quiet) +from pytest import raises from mock import Mock, patch -from nose.tools import eq_, raises, ok_ from tempfile import NamedTemporaryFile -from .utils import create_image +from .utils import create_image, eq_, assert_true def test_extension_to_format(): @@ -20,14 +20,14 @@ def test_format_to_extension_no_init(): eq_(format_to_extension('ICO'), '.ico') -@raises(UnknownFormat) def test_unknown_format(): - format_to_extension('TXT') + with raises(UnknownFormat): + format_to_extension('TXT') -@raises(UnknownExtension) def test_unknown_extension(): - extension_to_format('.txt') + with raises(UnknownExtension): + extension_to_format('.txt') def test_default_extension(): @@ -43,14 +43,13 @@ def test_default_extension(): eq_(format_to_extension('JPEG'), '.jpg') -@raises(AttributeError) def test_filewrapper(): class K(object): def fileno(self): raise UnsupportedOperation - - FileWrapper(K()).fileno() + with raises(AttributeError): + FileWrapper(K()).fileno() def test_save_with_filename(): @@ -71,7 +70,7 @@ def test_format_normalization(): See https://github.com/matthewwithanm/django-imagekit/issues/262 """ im = Image.new('RGBA', (100, 100)) - ok_('transparency' in prepare_image(im, 'gIF')[1]) + assert_true('transparency' in prepare_image(im, 'gIF')[1]) def test_quiet(): """ Index: pilkit-2.0/tests/utils.py =================================================================== --- pilkit-2.0.orig/tests/utils.py +++ pilkit-2.0/tests/utils.py @@ -17,3 +17,11 @@ def get_image_file(): def create_image(): return Image.open(get_image_file()) + + +def eq_(first, second): + assert first == second + + +def assert_true(first): + assert first is True