Accepting request 855666 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/855666
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-genty?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2020-12-16 09:59:37 +00:00 committed by Git OBS Bridge
commit c61b6ff190
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Dec 14 00:46:41 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Fix condition around BuildRequirement
-------------------------------------------------------------------
Sun Dec 13 19:33:37 UTC 2020 - Matej Cepl <mcepl@suse.com>
- We don't need to break Python 2.7
-------------------------------------------------------------------
Tue Dec 8 07:55:53 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@ -31,6 +31,9 @@ Patch0: remove_mock.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
%if 0%{?suse_version} <= 1500
BuildRequires: python-mock
%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six

View File

@ -1,11 +1,14 @@
--- a/test/test_genty.py
+++ b/test/test_genty.py
@@ -3,7 +3,7 @@
@@ -3,7 +3,10 @@
from __future__ import unicode_literals
import functools
import inspect
-from mock import patch
+from unittest.mock import patch
+try:
+ from unittest.mock import patch
+except ImportError:
+ from mock import patch
import six
from genty import genty, genty_args, genty_dataset, genty_repeat, genty_dataprovider
from genty.genty import REPLACE_FOR_PERIOD_CHAR