import CS python-parameterized-0.9.0-8.el10
This commit is contained in:
commit
cd48e3795e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
parameterized-0.9.0.tar.gz
|
||||
24
169.patch
Normal file
24
169.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From d64843df5f339f486a9b29d492f2988a3bf8485b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
|
||||
Date: Tue, 2 May 2023 13:48:00 +0200
|
||||
Subject: [PATCH] Remove the usage of assertRaisesRegexp unit test alias
|
||||
removed in Python 3.12
|
||||
|
||||
https://bugs.python.org/issue?@action=redirect&bpo=45162
|
||||
---
|
||||
parameterized/test.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/parameterized/test.py b/parameterized/test.py
|
||||
index 6c71f79..498c591 100644
|
||||
--- a/parameterized/test.py
|
||||
+++ b/parameterized/test.py
|
||||
@@ -35,7 +35,7 @@ def assert_raises_regexp_decorator(expected_exception, expected_regexp):
|
||||
def func_decorator(func):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
- with self.assertRaisesRegexp(expected_exception, expected_regexp):
|
||||
+ with self.assertRaisesRegex(expected_exception, expected_regexp):
|
||||
func(self, *args, **kwargs)
|
||||
|
||||
return wrapper
|
||||
83
176.patch
Normal file
83
176.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From 85cd1c5e0b95a75385e68972ceef3329edb7b7f0 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Mon, 30 Oct 2023 10:38:27 -0400
|
||||
Subject: [PATCH 1/2] Fix tests to handle Python 3.13 stripping indents from
|
||||
docstrings
|
||||
|
||||
https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes
|
||||
|
||||
https://github.com/python/cpython/issues/81283
|
||||
---
|
||||
parameterized/test.py | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/parameterized/test.py b/parameterized/test.py
|
||||
index 6c71f79..6419171 100644
|
||||
--- a/parameterized/test.py
|
||||
+++ b/parameterized/test.py
|
||||
@@ -408,10 +408,16 @@ def test_multiline_documentation(self, foo):
|
||||
"""Documentation.
|
||||
|
||||
More"""
|
||||
- self._assert_docstring(
|
||||
- "Documentation [with foo=%r].\n\n"
|
||||
- " More" %(foo, )
|
||||
- )
|
||||
+ if sys.version_info[:2] < (3, 13):
|
||||
+ self._assert_docstring(
|
||||
+ "Documentation [with foo=%r].\n\n"
|
||||
+ " More" %(foo, )
|
||||
+ )
|
||||
+ else:
|
||||
+ self._assert_docstring(
|
||||
+ "Documentation [with foo=%r].\n\n"
|
||||
+ "More" %(foo, )
|
||||
+ )
|
||||
|
||||
@parameterized.expand([param("foo")])
|
||||
def test_unicode_docstring(self, foo):
|
||||
|
||||
From dc7b89e9c995137219f3e53f5314824c4a0b914f Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Mon, 30 Oct 2023 10:49:25 -0400
|
||||
Subject: [PATCH 2/2] More elegantly patch tests for Python 3.13 docstring
|
||||
cleaning
|
||||
|
||||
---
|
||||
parameterized/test.py | 16 ++++++----------
|
||||
1 file changed, 6 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/parameterized/test.py b/parameterized/test.py
|
||||
index 6419171..6d11e32 100644
|
||||
--- a/parameterized/test.py
|
||||
+++ b/parameterized/test.py
|
||||
@@ -385,6 +385,8 @@ def _assert_docstring(self, expected_docstring, rstrip=False):
|
||||
actual_docstring = test_method.__doc__
|
||||
if rstrip:
|
||||
actual_docstring = actual_docstring.rstrip()
|
||||
+ if sys.version_info[:2] >= (3, 13):
|
||||
+ expected_docstring = inspect.cleandoc(expected_docstring)
|
||||
assert_equal(actual_docstring, expected_docstring)
|
||||
|
||||
@parameterized.expand([param("foo")],
|
||||
@@ -408,16 +410,10 @@ def test_multiline_documentation(self, foo):
|
||||
"""Documentation.
|
||||
|
||||
More"""
|
||||
- if sys.version_info[:2] < (3, 13):
|
||||
- self._assert_docstring(
|
||||
- "Documentation [with foo=%r].\n\n"
|
||||
- " More" %(foo, )
|
||||
- )
|
||||
- else:
|
||||
- self._assert_docstring(
|
||||
- "Documentation [with foo=%r].\n\n"
|
||||
- "More" %(foo, )
|
||||
- )
|
||||
+ self._assert_docstring(
|
||||
+ "Documentation [with foo=%r].\n\n"
|
||||
+ " More" %(foo, )
|
||||
+ )
|
||||
|
||||
@parameterized.expand([param("foo")])
|
||||
def test_unicode_docstring(self, foo):
|
||||
194
python-parameterized.spec
Normal file
194
python-parameterized.spec
Normal file
@ -0,0 +1,194 @@
|
||||
## START: Set by rpmautospec
|
||||
## (rpmautospec version 0.5.1)
|
||||
## RPMAUTOSPEC: autorelease, autochangelog
|
||||
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||
release_number = 8;
|
||||
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||
print(release_number + base_release_number - 1);
|
||||
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||
## END: Set by rpmautospec
|
||||
|
||||
Name: python-parameterized
|
||||
Version: 0.9.0
|
||||
Release: %autorelease
|
||||
Summary: Parameterized testing with any Python test framework
|
||||
|
||||
License: BSD-2-Clause-Views
|
||||
URL: https://github.com/wolever/parameterized
|
||||
# CHANGELOG.txt is no longer included in the PyPI sdist
|
||||
# https://github.com/wolever/parameterized/issues/168
|
||||
# Source: %%{pypi_source parameterized}
|
||||
Source: %{url}/archive/v%{version}/parameterized-%{version}.tar.gz
|
||||
|
||||
# Remove the usage of assertRaisesRegexp unit test alias removed in Python 3.12
|
||||
Patch: https://github.com/wolever/parameterized/pull/169.patch
|
||||
|
||||
# Fix tests to handle Python 3.13 stripping indents from docstrings
|
||||
Patch: https://github.com/wolever/parameterized/pull/176.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
# Upstream supports tox, and in theory we could generate these by something like:
|
||||
# %%pyproject_buildrequires -t -e %%{toxenv}-nose2,%%{toxenv}-pytest4,%%{toxenv}-unit
|
||||
# but upstream is not keeping up, and we would also have to patch in support
|
||||
# for environments after py311. It’s not worth it; we can more easily run the
|
||||
# tests manually and specify the BR’s manually. See %%check.
|
||||
BuildRequires: python3dist(nose2)
|
||||
BuildRequires: python3dist(pytest)
|
||||
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
|
||||
%package -n python3-parameterized
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n python3-parameterized
|
||||
%{summary}.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n parameterized-%{version}
|
||||
sed -r -i 's/^import mock/from unittest import mock/' parameterized/test.py
|
||||
# Workaround for:
|
||||
# Support pytest7
|
||||
# https://github.com/wolever/parameterized/issues/167
|
||||
sed -r -i 's/assert_equal\(missing/# &/' parameterized/test.py
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%pyproject_save_files parameterized
|
||||
|
||||
|
||||
%check
|
||||
%{py3_test_envvars} %{python3} -m nose2 -v
|
||||
%pytest parameterized/test.py
|
||||
%{py3_test_envvars} %{python3} -m unittest -v parameterized.test
|
||||
|
||||
|
||||
%files -n python3-parameterized -f %{pyproject_files}
|
||||
# pyproject_files handles LICENSE.txt; verify with “rpm -qL -p …”
|
||||
%doc CHANGELOG.txt README.rst
|
||||
|
||||
|
||||
%changelog
|
||||
## START: Generated by rpmautospec
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Mon Oct 30 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.9.0-6
|
||||
- Fix tests to handle Python 3.13 stripping indents from docstrings
|
||||
- Fixes RHBZ#2247031
|
||||
|
||||
* Thu Oct 12 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.9.0-5
|
||||
- F38+: Use %%{py3_test_envvars} to run tests
|
||||
- Set the same environment variables for nose2 and unittest as for pytest
|
||||
when testing with different runners
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Mon Jun 19 2023 Python Maint <python-maint@redhat.com> - 0.9.0-3
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Tue May 02 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.9.0-2
|
||||
- Remove the usage of assertRaisesRegexp unit test alias removed in Python
|
||||
3.12
|
||||
|
||||
* Sat Apr 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.9.0-1
|
||||
- Update to 0.9.0 (close RHBZ#2181939)
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Aug 29 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.8.1-5
|
||||
- Update License field to SPDX
|
||||
- Drop dependency on deprecated python-nose
|
||||
- Port to pyproject-rpm-macros
|
||||
|
||||
* Sun Jul 24 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.8.1-4
|
||||
- Fix nose2-0.12.0 compatibility: do not use the python-versioned entry point
|
||||
for nose2, e.g. nose2-3.11
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.8.1-2
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Wed Jun 08 2022 Miro Hrončok <mhroncok@redhat.com> - 0.8.1-1
|
||||
- Update to 0.8.1
|
||||
- Fixes: rhbz#1697443
|
||||
- Fix test failures with pytest 7+
|
||||
- Fixes: rhbz#2059963
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.7.4-3
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Jan 21 2021 Jiri Popelka <jpopelka@redhat.com> - 0.7.4-1
|
||||
- 0.7.4
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0-3
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Nov 08 2019 Jiri Popelka <jpopelka@redhat.com> - 0.7.0-1
|
||||
- 0.7.0
|
||||
- Don't use now orphaned python-unittest2
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-9
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-8
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sun Aug 12 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.1-5
|
||||
- Drop python2 subpackage
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-3
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Sun Nov 19 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.1-1
|
||||
- Initial package
|
||||
|
||||
## END: Generated by rpmautospec
|
||||
Loading…
Reference in New Issue
Block a user