diff --git a/python-blinker-remove-nose.patch b/python-blinker-remove-nose.patch new file mode 100644 index 0000000..79f1783 --- /dev/null +++ b/python-blinker-remove-nose.patch @@ -0,0 +1,32 @@ +Index: blinker-1.4/tests/test_signals.py +=================================================================== +--- blinker-1.4.orig/tests/test_signals.py 2015-07-23 13:34:42.000000000 +0200 ++++ blinker-1.4/tests/test_signals.py 2020-07-08 15:07:17.109435209 +0200 +@@ -4,7 +4,7 @@ import time + + import blinker + +-from nose.tools import assert_raises ++import pytest + + + jython = sys.platform.startswith('java') +@@ -227,7 +227,7 @@ def test_meta_connect_failure(): + pass + sig = blinker.Signal() + +- assert_raises(TypeError, sig.connect, receiver) ++ pytest.raises(TypeError, sig.connect, receiver) + assert not sig.receivers + assert not sig._by_receiver + assert sig._by_sender == {blinker.base.ANY_ID: set()} +@@ -487,9 +487,4 @@ def values_are_empty_sets_(dictionary): + for val in dictionary.values(): + assert val == set() + +-if sys.version_info < (2, 5): +- def test_context_manager_warning(): +- sig = blinker.Signal() +- receiver = lambda sender: None + +- assert_raises(RuntimeError, sig.connected_to, receiver) diff --git a/python-blinker.changes b/python-blinker.changes index 258a175..4ce8816 100644 --- a/python-blinker.changes +++ b/python-blinker.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jul 8 13:23:59 UTC 2020 - pgajdos@suse.com + +- use pytest instead of deprecated nose +- added patches + https://github.com/jek/blinker/pull/60 + + python-blinker-remove-nose.patch + ------------------------------------------------------------------- Thu Dec 6 11:24:47 UTC 2018 - Tomáš Chvátal diff --git a/python-blinker.spec b/python-blinker.spec index 623714e..c29220a 100644 --- a/python-blinker.spec +++ b/python-blinker.spec @@ -1,7 +1,7 @@ # # spec file for package python-blinker # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,9 @@ License: MIT Group: Development/Languages/Python URL: https://pythonhosted.org/blinker/ Source: https://files.pythonhosted.org/packages/source/b/blinker/blinker-%{version}.tar.gz -BuildRequires: %{python_module nose} +# https://github.com/jek/blinker/pull/60 +Patch0: python-blinker-remove-nose.patch +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -55,6 +57,7 @@ This sub-package contains the HTML documentation. %prep %setup -q -n blinker-%{version} +%patch0 -p1 # remove unneded doc file that trigger rpmlint rm docs/html/objects.inv @@ -66,7 +69,7 @@ rm docs/html/objects.inv %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec %{_bindir}/nosetests-%{$python_bin_suffix} +%pytest %files %{python_files} %license LICENSE