Hello community,

here is the log from the commit of package python-URLObject for 
openSUSE:Factory checked in at 2020-06-06 23:39:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-URLObject (Old)
 and      /work/SRC/openSUSE:Factory/.python-URLObject.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-URLObject"

Sat Jun  6 23:39:56 2020 rev:4 rq:811923 version:2.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-URLObject/python-URLObject.changes        
2019-11-08 15:26:39.243053641 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-URLObject.new.3606/python-URLObject.changes  
    2020-06-06 23:40:09.845058902 +0200
@@ -1,0 +2,6 @@
+Fri Jun  5 14:37:28 UTC 2020 - Matej Cepl <[email protected]>
+
+- Add remove_nose.patch replacing use of nose with the standard
+  library.
+
+-------------------------------------------------------------------

New:
----
  remove_nose.patch

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

Other differences:
------------------
++++++ python-URLObject.spec ++++++
--- /var/tmp/diff_new_pack.1mM5vf/_old  2020-06-06 23:40:11.985065618 +0200
+++ /var/tmp/diff_new_pack.1mM5vf/_new  2020-06-06 23:40:11.989065630 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-URLObject
 #
-# 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
@@ -24,12 +24,15 @@
 License:        SUSE-Public-Domain
 URL:            https://github.com/zacharyvoase/urlobject
 Source:         
https://files.pythonhosted.org/packages/source/U/URLObject/URLObject-%{version}.tar.gz
+# patch-feature-upstream remove_nose.patch gh#zacharyvoase/urlobject#42 
[email protected]
+# Remove the need for nose and use the standard library.
+Patch0:         remove_nose.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
 # SECTION test requirements
-BuildRequires:  %{python_module nose}
+BuildRequires:  %{python_module pytest}
 # /SECTION
 %python_subpackages
 
@@ -42,6 +45,7 @@
 
 %prep
 %setup -q -n URLObject-%{version}
+%autopatch -p1
 
 %build
 %python_build
@@ -51,7 +55,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_expand nosetests-%{$python_bin_suffix}
+%pytest
 
 %files %{python_files}
 %doc README.rst

++++++ remove_nose.patch ++++++
--- a/test/netloc_test.py
+++ b/test/netloc_test.py
@@ -1,7 +1,5 @@
 import unittest
 
-from nose.tools import assert_raises
-
 from urlobject.netloc import Netloc
 
 
@@ -49,8 +47,8 @@ class NetlocTest(unittest.TestCase):
                 'zack:[email protected]:443')
 
     def 
test_with_password_on_a_netloc_with_no_username_raises_ValueError(self):
-        assert_raises(ValueError,
-                      lambda: Netloc('github.com').with_password('1234'))
+        with self.assertRaises(ValueError):
+            Netloc('github.com').with_password('1234')
 
     def test_with_auth_with_one_arg_adds_username(self):
         assert (Netloc('github.com').with_auth('zack') ==
--- a/test/urlobject_test.py
+++ b/test/urlobject_test.py
@@ -2,7 +2,6 @@ import platform
 import doctest
 import unittest
 
-from nose.tools import assert_raises
 from urlobject import urlobject as urlobject_module
 from urlobject import URLObject
 from urlobject.six import text_type, u, print_
@@ -188,7 +187,8 @@ class URLObjectModificationTest(unittest
 
     def test_with_password_raises_ValueError_when_there_is_no_username(self):
         url = URLObject('https://github.com/')
-        assert_raises(ValueError, lambda: url.with_password('1234'))
+        with self.assertRaises(ValueError):
+            url.with_password('1234')
 
     def test_with_password_replaces_password(self):
         url = URLObject('https://zack:[email protected]/')

Reply via email to