From 26b6bb6d6bd91f03e2cbeb466e9b0c5827c97e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 17 May 2023 15:11:54 +0200 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-genty revision 145d76e7cb456f0752c56715ee5a31f4 --- .gitattributes | 23 +++++++++++++++ genty-1.3.2.tar.gz | 3 ++ python-genty.changes | 39 +++++++++++++++++++++++++ python-genty.spec | 68 ++++++++++++++++++++++++++++++++++++++++++++ remove_mock.patch | 14 +++++++++ 5 files changed, 147 insertions(+) create mode 100644 .gitattributes create mode 100644 genty-1.3.2.tar.gz create mode 100644 python-genty.changes create mode 100644 python-genty.spec create mode 100644 remove_mock.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/genty-1.3.2.tar.gz b/genty-1.3.2.tar.gz new file mode 100644 index 0000000..a48d295 --- /dev/null +++ b/genty-1.3.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e3f5bfe2d3a757c0e2a48ac4716bca42d3b76d9cfc3401ef606635049c35dab +size 20818 diff --git a/python-genty.changes b/python-genty.changes new file mode 100644 index 0000000..b9cded5 --- /dev/null +++ b/python-genty.changes @@ -0,0 +1,39 @@ +------------------------------------------------------------------- +Fri Apr 21 12:25:40 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:41:34 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Mon Dec 14 00:46:41 UTC 2020 - Benjamin Greiner + +- Fix condition around BuildRequirement + +------------------------------------------------------------------- +Sun Dec 13 19:33:37 UTC 2020 - Matej Cepl + +- We don't need to break Python 2.7 + +------------------------------------------------------------------- +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 + +- Use noun phrase in summary. + +------------------------------------------------------------------- +Tue Mar 12 15:27:12 UTC 2019 - Tomáš Chvátal + +- Remove conditional for tests + +------------------------------------------------------------------- +Fri Oct 20 16:15:09 UTC 2017 - toddrme2178@gmail.com + +- initial version diff --git a/python-genty.spec b/python-genty.spec new file mode 100644 index 0000000..10fd8f3 --- /dev/null +++ b/python-genty.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-genty +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} +Name: python-genty +Version: 1.3.2 +Release: 0 +Summary: Python module to run a test with multiple data sets +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 setuptools} +BuildRequires: %{python_module six} +%if 0%{?suse_version} <= 1500 +BuildRequires: python-mock +%endif +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-six +Suggests: python-ordereddict +BuildArch: noarch +%python_subpackages + +%description +Genty, pronounced "gen-tee", stands for "generate tests". It promotes +generative testing, where a single test can execute over a variety of +input. Genty makes this a breeze. + +%prep +%autosetup -p1 -n genty-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest discover -v + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/* + +%changelog diff --git a/remove_mock.patch b/remove_mock.patch new file mode 100644 index 0000000..d7a87d2 --- /dev/null +++ b/remove_mock.patch @@ -0,0 +1,14 @@ +--- a/test/test_genty.py ++++ b/test/test_genty.py +@@ -3,7 +3,10 @@ + from __future__ import unicode_literals + import functools + import inspect +-from 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