Accepting request 988812 from devel:languages:python

- Remove mock from BuildRequires.
- Rebase python-sure-no-mock.patch to remove one missed import.

OBS-URL: https://build.opensuse.org/request/show/988812
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sure?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2022-07-14 14:33:15 +00:00 committed by Git OBS Bridge
commit 2ca077d0af
3 changed files with 26 additions and 9 deletions

View File

@ -1,6 +1,8 @@
--- a/sure/core.py
+++ b/sure/core.py
@@ -21,7 +21,10 @@
Index: sure-2.0.0/sure/core.py
===================================================================
--- sure-2.0.0.orig/sure/core.py
+++ sure-2.0.0/sure/core.py
@@ -21,7 +21,10 @@ import os
try:
from mock import _CallList
except ImportError:
@ -20,4 +22,16 @@
anything = Anything()
Index: sure-2.0.0/tests/test_assertion_builder.py
===================================================================
--- sure-2.0.0.orig/tests/test_assertion_builder.py
+++ sure-2.0.0/tests/test_assertion_builder.py
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import re
-import mock
+from unittest import mock
from collections import OrderedDict
from datetime import datetime, timedelta

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 13 04:37:13 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Remove mock from BuildRequires.
- Rebase python-sure-no-mock.patch to remove one missed import.
-------------------------------------------------------------------
Wed May 4 08:38:45 UTC 2022 - pgajdos@suse.com

View File

@ -22,12 +22,10 @@ Version: 2.0.0
Release: 0
Summary: Utility belt for automated testing in python for python
License: GPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/gabrielfalcao/sure
Source: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz
# https://github.com/gabrielfalcao/sure/pull/161
# Based on https://github.com/gabrielfalcao/sure/pull/161
Patch0: python-sure-no-mock.patch
BuildRequires: %{python_module mock >= 2.0.0}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10.0}
@ -44,8 +42,7 @@ A testing library for python with powerful and flexible assertions. Sure is
heavily inspired by should.js
%prep
%setup -q -n sure-%{version}
%patch0 -p1
%autosetup -p1 -n sure-%{version}
sed -i '/^#!/d' sure/*.py
sed -i 's/--cov=sure//' setup.cfg