diff --git a/fix-assert-method.patch b/fix-assert-method.patch new file mode 100644 index 0000000..61a8b27 --- /dev/null +++ b/fix-assert-method.patch @@ -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?= +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 diff --git a/python-parameterized.changes b/python-parameterized.changes index f6ed4c3..8de74ef 100644 --- a/python-parameterized.changes +++ b/python-parameterized.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 15 09:02:40 UTC 2023 - Steve Kowalik + +- Add patch fix-assert-method.patch: + * Use correct assertion method. + ------------------------------------------------------------------- Fri May 12 09:54:40 UTC 2023 - Matej Cepl diff --git a/python-parameterized.spec b/python-parameterized.spec index 9e8d6e6..4fce8a7 100644 --- a/python-parameterized.spec +++ b/python-parameterized.spec @@ -38,6 +38,8 @@ Patch1: remove_nose.patch # PATCH-FIX-UPSTREAM skip_failing_teardown.patch gh#wolever/parameterized#167 mcepl@suse.com # skip failing assert in tearDownModule [sic] Patch2: skip_failing_teardown.patch +# PATCH-FIX-UPSTREAM gh#wolever/parameterized#169 +Patch3: fix-assert-method.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module wheel} @@ -80,6 +82,6 @@ skip_tests="test_with_docstring_1_v_l_ or test_with_docstring_0_value1" # %%doc CHANGELOG.txt %license LICENSE.txt %{python_sitelib}/parameterized -%{python_sitelib}/parameterized-%{version}*-info +%{python_sitelib}/parameterized-%{version}.dist-info %changelog