diff --git a/python-argh-no_mock.patch b/python-argh-no_mock.patch new file mode 100644 index 0000000..c03eb3e --- /dev/null +++ b/python-argh-no_mock.patch @@ -0,0 +1,65 @@ +Index: argh-0.26.2/setup.py +=================================================================== +--- argh-0.26.2.orig/setup.py 2016-05-11 21:05:03.000000000 +0200 ++++ argh-0.26.2/setup.py 2022-03-10 11:06:42.410811689 +0100 +@@ -82,7 +82,7 @@ setup( + install_requires = install_requires, + + # testing +- tests_require = ['pytest', 'mock', 'iocapture'], ++ tests_require = ['pytest', 'iocapture'], + cmdclass = {'test': PyTest}, + + # copyright +Index: argh-0.26.2/test/test_assembling.py +=================================================================== +--- argh-0.26.2.orig/test/test_assembling.py 2014-10-26 22:04:34.000000000 +0100 ++++ argh-0.26.2/test/test_assembling.py 2022-03-10 11:06:42.410811689 +0100 +@@ -4,7 +4,7 @@ Unit Tests For Assembling Phase + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + """ + import sys +-import mock ++import unittest.mock as mock + import pytest + + import argh +Index: argh-0.26.2/test/test_dispatching.py +=================================================================== +--- argh-0.26.2.orig/test/test_dispatching.py 2015-10-13 00:25:40.000000000 +0200 ++++ argh-0.26.2/test/test_dispatching.py 2022-03-10 11:06:42.410811689 +0100 +@@ -4,7 +4,7 @@ Dispatching tests + ~~~~~~~~~~~~~~~~~ + """ + import argh +-from mock import Mock, patch ++from unittest.mock import Mock, patch + import pytest + + from .base import make_IO +Index: argh-0.26.2/test/test_integration.py +=================================================================== +--- argh-0.26.2.orig/test/test_integration.py 2022-03-10 11:06:42.398811617 +0100 ++++ argh-0.26.2/test/test_integration.py 2022-03-10 11:06:42.410811689 +0100 +@@ -8,7 +8,7 @@ import re + import argparse + + import iocapture +-import mock ++import unittest.mock as mock + import pytest + + import argh +Index: argh-0.26.2/test/test_interaction.py +=================================================================== +--- argh-0.26.2.orig/test/test_interaction.py 2014-01-06 07:20:25.000000000 +0100 ++++ argh-0.26.2/test/test_interaction.py 2022-03-10 11:07:05.850951267 +0100 +@@ -4,7 +4,7 @@ Interaction Tests + ~~~~~~~~~~~~~~~~~ + """ + import sys +-import mock ++import unittest.mock as mock + + import argh + diff --git a/python-argh.changes b/python-argh.changes index e639cc2..c89f7a5 100644 --- a/python-argh.changes +++ b/python-argh.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 10 10:09:41 UTC 2022 - pgajdos@suse.com + +- do not use python-mock for testing +- added patches + fix https://github.com/neithere/argh/issues/152 + + python-argh-no_mock.patch + ------------------------------------------------------------------- Wed Sep 22 04:41:45 UTC 2021 - Steve Kowalik diff --git a/python-argh.spec b/python-argh.spec index 3944b84..42db61e 100644 --- a/python-argh.spec +++ b/python-argh.spec @@ -1,7 +1,7 @@ # # spec file for package python-argh # -# Copyright (c) 2021 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 @@ -25,8 +25,9 @@ License: LGPL-3.0-or-later URL: https://github.com/neithere/argh/ Source: https://files.pythonhosted.org/packages/source/a/argh/argh-%{version}.tar.gz Patch0: support-py39.patch +# https://github.com/neithere/argh/issues/152 +Patch1: python-argh-no_mock.patch BuildRequires: %{python_module iocapture} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes