15
0
forked from pool/python-argh

Accepting request 960713 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/960713
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-argh?expand=0&rev=18
This commit is contained in:
2022-03-10 21:45:23 +00:00
committed by Git OBS Bridge
3 changed files with 76 additions and 2 deletions

65
python-argh-no_mock.patch Normal file
View File

@@ -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

View File

@@ -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 <steven.kowalik@suse.com>

View File

@@ -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