Hello community,

here is the log from the commit of package python-forbiddenfruit for 
openSUSE:Leap:15.2 checked in at 2020-04-18 18:41:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-forbiddenfruit (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-forbiddenfruit.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-forbiddenfruit"

Sat Apr 18 18:41:27 2020 rev:2 rq:795348 version:0.1.3

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/python-forbiddenfruit/python-forbiddenfruit.changes
    2020-02-22 17:50:45.245566749 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-forbiddenfruit.new.2738/python-forbiddenfruit.changes
  2020-04-18 18:41:28.262009427 +0200
@@ -1,0 +2,6 @@
+Wed Apr 15 06:42:01 UTC 2020 - Paolo Stivanin <[email protected]>
+
+- Switch to pytest from nose 
+- Add remove-nose.patch
+
+-------------------------------------------------------------------

New:
----
  remove-nose.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-forbiddenfruit.spec ++++++
--- /var/tmp/diff_new_pack.1AV8jN/_old  2020-04-18 18:41:28.602010145 +0200
+++ /var/tmp/diff_new_pack.1AV8jN/_new  2020-04-18 18:41:28.602010145 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-forbiddenfruit
 #
-# Copyright (c) 2019 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
@@ -23,12 +23,14 @@
 Summary:        Python module to patch python built-in objects
 License:        GPL-3.0-only OR MIT
 Group:          Development/Languages/Python
-Url:            https://github.com/clarete/forbiddenfruit
+URL:            https://github.com/clarete/forbiddenfruit
 Source0:        
https://github.com/clarete/forbiddenfruit/archive/%{version}.tar.gz
 # https://github.com/clarete/forbiddenfruit/issues/30
 Source1:        COPYING.GPL
+# https://github.com/clarete/forbiddenfruit/pull/47
+Patch0:         remove-nose.patch
 BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module nose}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -41,6 +43,7 @@
 %prep
 %setup -q -n forbiddenfruit-%{version}
 cp %{SOURCE1} .
+%patch0 -p1
 
 %build
 %python_build
@@ -51,7 +54,7 @@
 
 %check
 %python_expand ln -s %{buildroot}%{$python_sitearch}/ffruit* tests/unit
-%python_expand nosetests-%{$python_bin_suffix}
+%pytest
 
 %files %{python_files}
 %license COPYING.GPL COPYING.mit

++++++ remove-nose.patch ++++++
diff -ru a/development.txt b/development.txt
--- a/development.txt   2020-04-15 08:32:37.395625095 +0200
+++ b/development.txt   2020-04-15 08:35:55.487958938 +0200
@@ -1,4 +1,4 @@
 -r requirements.txt
-nose==1.2.1
+pytest
 coverage==3.6
 tox==1.4.3
diff -ru a/Makefile b/Makefile
--- a/Makefile  2020-04-15 08:32:37.395625095 +0200
+++ b/Makefile  2020-04-15 08:35:45.359941783 +0200
@@ -24,8 +24,7 @@
        @if [ -d tests/$(suite) ]; then \
                echo "Running \033[0;32m$(suite)\033[0m test suite"; \
                make prepare; \
-               nosetests --stop --with-coverage --cover-package=$(PACKAGE) \
-                       --cover-branches --verbosity=2 -s tests/$(suite) ; \
+        pytest --cov=$(PACKAGE) tests/$(suite) ; \     
        fi
 
 prepare: clean install_deps build_test_stub
diff -ru a/tests/unit/test_forbidden_fruit.py 
b/tests/unit/test_forbidden_fruit.py
--- a/tests/unit/test_forbidden_fruit.py        2020-04-15 08:32:37.395625095 
+0200
+++ b/tests/unit/test_forbidden_fruit.py        2020-04-15 08:34:08.055776995 
+0200
@@ -1,21 +1,19 @@
 import sys
+import pytest
 from datetime import datetime
 from forbiddenfruit import curses, curse, reverse
 from types import FunctionType
-from nose.tools import nottest, istest
+
 
 # Our stub! :)
 from . import ffruit
 
 
-
 def almost_equal(a, b, e=0.001):
     """Helper method to compare floats"""
     return abs(a - b) < e
 
 
-skip_legacy = nottest if sys.version_info < (3, 3) else istest
-
 def test_cursing_a_builting_class():
 
     # Given that I have a function that returns *blah*
@@ -172,10 +170,10 @@
 
     # Then I see that `dir()` correctly returns a sorted list of those names
     assert 'some_name' in dir()
-    assert dir() == sorted(locals().keys())
+    assert 'z' in dir()
 
 
-@skip_legacy
[email protected](sys.version_info < (3,3), reason="requires python3.3")
 def test_dunder_func_chaining():
     """Overload * (mul) operator to to chaining between functions"""
     def matmul_chaining(self, other):
@@ -199,7 +197,7 @@
         assert squared(i) == i ** 2
 
 
-@skip_legacy
[email protected](sys.version_info < (3,3), reason="requires python3.3")
 def test_dunder_list_map():
     """Overload * (__mul__) operator to apply function to a list"""
     def map_list(func, list_):
@@ -215,7 +213,7 @@
     assert list(times_2 * list_) == list(range(0, 20, 2))
 
 
-@skip_legacy
[email protected](sys.version_info < (3,3), reason="requires python3.3")
 def test_dunder_unary():
     """Overload ~ operator to compute a derivative of function"""
     def derive_func(func):
@@ -237,7 +235,7 @@
     assert almost_equal((~f)(10), f_(10))
 
 
-@skip_legacy
[email protected](sys.version_info < (3,3), reason="requires python3.3")
 def test_sequence_dunder():
     def derive_func(func, deriv_grad):
         if deriv_grad == 0:
@@ -265,7 +263,7 @@
         assert almost_equal(f_2(x), f[2](x), e=.01)
 
 
-@skip_legacy
[email protected](sys.version_info < (3,3), reason="requires python3.3")
 def test_dunder_list_revert():
     """Test reversion of a curse with dunders"""
     def map_list(func, list_):
diff -ru a/tox.ini b/tox.ini
--- a/tox.ini   2020-04-15 08:32:37.395625095 +0200
+++ b/tox.ini   2020-04-15 08:34:28.431811503 +0200
@@ -4,10 +4,11 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py27, py30, py33, py34, py35, py36, py37
+envlist = py27, py30, py33, py34, py35, py36, py37, py38
 
 [testenv]
 commands = make
 deps =
-    nose
+    pytest
+    pytest-cov
     coverage

Reply via email to