From 8af5717763ef7119afde791b3f2b049bd1fa97433204ad7c505f4a95c72db150 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 13 Jul 2022 04:38:11 +0000 Subject: [PATCH] - Remove mock from BuildRequires. - Rebase python-sure-no-mock.patch to remove one missed import. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sure?expand=0&rev=25 --- python-sure-no-mock.patch | 22 ++++++++++++++++++---- python-sure.changes | 6 ++++++ python-sure.spec | 7 ++----- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/python-sure-no-mock.patch b/python-sure-no-mock.patch index 3fac1f9..16df5c8 100644 --- a/python-sure-no-mock.patch +++ b/python-sure-no-mock.patch @@ -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 . + from __future__ import unicode_literals + import re +-import mock ++from unittest import mock + from collections import OrderedDict + + from datetime import datetime, timedelta diff --git a/python-sure.changes b/python-sure.changes index 95d87f4..0407b21 100644 --- a/python-sure.changes +++ b/python-sure.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 13 04:37:13 UTC 2022 - Steve Kowalik + +- 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 diff --git a/python-sure.spec b/python-sure.spec index 76e6570..a4eeaf5 100644 --- a/python-sure.spec +++ b/python-sure.spec @@ -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