Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-exam for openSUSE:Factory 
checked in at 2022-03-15 19:03:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-exam (Old)
 and      /work/SRC/openSUSE:Factory/.python-exam.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-exam"

Tue Mar 15 19:03:42 2022 rev:5 rq:961561 version:0.10.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-exam/python-exam.changes  2020-08-25 
12:37:02.049384662 +0200
+++ /work/SRC/openSUSE:Factory/.python-exam.new.25692/python-exam.changes       
2022-03-15 19:03:47.468902193 +0100
@@ -1,0 +2,8 @@
+Mon Mar 14 05:55:32 UTC 2022 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch no-mock.patch:
+  * Stop using mock.
+- Drop mock BuildRequires/Requires.
+- No longer run testsuite twice. 
+
+-------------------------------------------------------------------

New:
----
  no-mock.patch

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

Other differences:
------------------
++++++ python-exam.spec ++++++
--- /var/tmp/diff_new_pack.DqgHF0/_old  2022-03-15 19:03:47.936902510 +0100
+++ /var/tmp/diff_new_pack.DqgHF0/_new  2022-03-15 19:03:47.940902513 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-exam
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,20 +22,16 @@
 Release:        0
 Summary:        Helpers for better testing
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/fluxx/exam
 Source:         
https://files.pythonhosted.org/packages/source/e/exam/exam-%{version}.tar.gz
 Source1:        https://raw.githubusercontent.com/Fluxx/exam/master/LICENSE
 # https://github.com/Fluxx/exam/pull/50
 Patch0:         remove_nose.patch
-BuildRequires:  %{python_module setuptools}
-BuildRequires:  python-rpm-macros
-BuildRequires:  %{python_module mock}
+Patch1:         no-mock.patch
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
-%ifpython2
-Requires:       python-mock
-%endif
+BuildRequires:  python-rpm-macros
 Recommends:     python-pep8
 Recommends:     python-pyflakes
 BuildArch:      noarch
@@ -49,8 +45,7 @@
 conventions and adhering to the unit testing interface.
 
 %prep
-%setup -q -n exam-%{version}
-%patch0 -p1
+%autosetup -p1 -n exam-%{version}
 cp %{SOURCE1} .
 
 %build
@@ -61,7 +56,6 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec -m unittest discover -s tests/ -v
 %pytest
 
 %files %{python_files}

++++++ no-mock.patch ++++++
Index: exam-0.10.6/exam/decorators.py
===================================================================
--- exam-0.10.6.orig/exam/decorators.py
+++ exam-0.10.6/exam/decorators.py
@@ -1,6 +1,6 @@
 from __future__ import absolute_import
 
-from mock import patch
+from unittest.mock import patch
 from functools import partial, wraps
 import types
 
Index: exam-0.10.6/exam/helpers.py
===================================================================
--- exam-0.10.6.orig/exam/helpers.py
+++ exam-0.10.6/exam/helpers.py
@@ -4,7 +4,7 @@ import shutil
 import os
 import functools
 
-from mock import MagicMock, patch, call
+from unittest.mock import MagicMock, patch, call
 
 
 def rm_f(path):
Index: exam-0.10.6/exam/mock.py
===================================================================
--- exam-0.10.6.orig/exam/mock.py
+++ exam-0.10.6/exam/mock.py
@@ -1,7 +1,7 @@
 from __future__ import absolute_import
 
-from mock import Mock as BaseMock
-from mock import call
+from unittest.mock import Mock as BaseMock
+from unittest.mock import call
 
 
 class Mock(BaseMock):
Index: exam-0.10.6/tests/test_cases.py
===================================================================
--- exam-0.10.6.orig/tests/test_cases.py
+++ exam-0.10.6/tests/test_cases.py
@@ -1,4 +1,4 @@
-from mock import sentinel
+from unittest.mock import sentinel
 from tests import TestCase
 
 from exam.decorators import before, after, around, patcher
Index: exam-0.10.6/tests/test_helpers.py
===================================================================
--- exam-0.10.6.orig/tests/test_helpers.py
+++ exam-0.10.6/tests/test_helpers.py
@@ -1,5 +1,5 @@
 from tests import TestCase
-from mock import patch, Mock, sentinel
+from unittest.mock import patch, Mock, sentinel
 
 from exam.helpers import intercept, rm_f, track, mock_import, call, effect
 from exam.decorators import fixture
Index: exam-0.10.6/tests/test_objects.py
===================================================================
--- exam-0.10.6.orig/tests/test_objects.py
+++ exam-0.10.6/tests/test_objects.py
@@ -1,4 +1,4 @@
-from mock import sentinel
+from unittest.mock import sentinel
 from tests import TestCase
 
 from exam.objects import always, noop

Reply via email to