Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-requirements-parser for 
openSUSE:Factory checked in at 2021-09-21 21:12:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requirements-parser (Old)
 and      /work/SRC/openSUSE:Factory/.python-requirements-parser.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requirements-parser"

Tue Sep 21 21:12:47 2021 rev:8 rq:920468 version:0.2.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-requirements-parser/python-requirements-parser.changes
    2020-04-15 19:56:32.293665238 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-requirements-parser.new.1899/python-requirements-parser.changes
  2021-09-21 21:13:39.258673352 +0200
@@ -1,0 +2,6 @@
+Tue Sep 21 01:02:21 UTC 2021 - Steve Kowalik <[email protected]>
+
+- Add remove-nose.patch:
+  * Use pytest, rather than nose.
+
+-------------------------------------------------------------------

New:
----
  remove-nose.patch

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

Other differences:
------------------
++++++ python-requirements-parser.spec ++++++
--- /var/tmp/diff_new_pack.ZBuE3D/_old  2021-09-21 21:13:39.678673827 +0200
+++ /var/tmp/diff_new_pack.ZBuE3D/_new  2021-09-21 21:13:39.682673831 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-requirements-parser
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,10 +27,11 @@
 Source:         
https://github.com/davidfischer/requirements-parser/archive/v%{version}.tar.gz#/requirements-parser-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM 
0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch 
[email protected] -- https://github.com/davidfischer/requirements-parser/pull/47
 Patch0:         
0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch
+Patch1:         remove-nose.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
-BuildRequires:  %{python_module nose}
+BuildRequires:  %{python_module pytest}
 # /SECTION
 BuildRequires:  fdupes
 BuildArch:      noarch
@@ -42,7 +43,7 @@
 
 %prep
 %setup -q -n requirements-parser-%{version}
-%patch0 -p1
+%autopatch -p1
 
 %build
 %python_build
@@ -52,7 +53,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec -m nose
+%pytest
 
 %files %{python_files}
 %doc AUTHORS.rst README.rst docs/*.rst

++++++ remove-nose.patch ++++++
Index: requirements-parser-0.2.0/tests/test_parser.py
===================================================================
--- requirements-parser-0.2.0.orig/tests/test_parser.py
+++ requirements-parser-0.2.0/tests/test_parser.py
@@ -1,6 +1,6 @@
 import os
 import json
-from nose.tools import raises, assert_equal
+from pytest import raises
 import warnings
 
 from requirements import parse
@@ -32,17 +32,17 @@ def test_requirement_files():
             return f
 
         @fancy
-        @raises(ValueError)
         def check_fail(s):
             with warnings.catch_warnings():
                 warnings.simplefilter("ignore")
-                list([dict(r) for r in parse(s)])
+                with raises(ValueError):
+                    list([dict(r) for r in parse(s)])
 
         @fancy
         def check(s, expected):
             with warnings.catch_warnings():
                 warnings.simplefilter("ignore")
-                assert_equal(listify(dict(r) for r in parse(s)), expected)
+                assert listify(dict(r) for r in parse(s)) == expected
 
         fp = os.path.join(REQFILE_DIR, fn)
 
@@ -51,8 +51,8 @@ def test_requirement_files():
             continue
 
         if 'fail' in fn:
-            yield check_fail, open(fp)
+            check_fail(open(fp))
         else:
             with open(fp[:-4] + '.expected', 'r') as f2:
                 expected = json.loads(f2.read())
-                yield check, open(fp), expected
+                check(open(fp), expected)

Reply via email to