diff --git a/python-genty.changes b/python-genty.changes index f5b0381..70b3d08 100644 --- a/python-genty.changes +++ b/python-genty.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 8 07:55:53 UTC 2020 - Matej Cepl + +- Add remove_mock.patch to remove dependency on the external mock package. + ------------------------------------------------------------------- Thu Mar 14 21:04:25 UTC 2019 - Jan Engelhardt diff --git a/python-genty.spec b/python-genty.spec index 07a5c53..9454bfe 100644 --- a/python-genty.spec +++ b/python-genty.spec @@ -1,7 +1,7 @@ # # spec file for package python-genty # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,9 +25,10 @@ License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/box/genty Source: https://files.pythonhosted.org/packages/source/g/genty/genty-%{version}.tar.gz +# PATCH-FEATURE-UPSTREAM remove_mock.patch bsc#[0-9]+ mcepl@suse.com +# Remove dependency on mock +Patch0: remove_mock.patch BuildRequires: %{python_module devel} -BuildRequires: %{python_module mock} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes @@ -43,7 +44,7 @@ generative testing, where a single test can execute over a variety of input. Genty makes this a breeze. %prep -%setup -q -n genty-%{version} +%autosetup -p1 -n genty-%{version} %build %python_build @@ -53,7 +54,7 @@ input. Genty makes this a breeze. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec setup.py test +%pyunittest discover -v %files %{python_files} %license LICENSE diff --git a/remove_mock.patch b/remove_mock.patch new file mode 100644 index 0000000..497ffd2 --- /dev/null +++ b/remove_mock.patch @@ -0,0 +1,11 @@ +--- a/test/test_genty.py ++++ b/test/test_genty.py +@@ -3,7 +3,7 @@ + from __future__ import unicode_literals + import functools + import inspect +-from mock import patch ++from unittest.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