Accepting request 1104007 from devel:languages:python

- Add patch fix-assert-method.patch:
  * Use correct assertion method.

OBS-URL: https://build.opensuse.org/request/show/1104007
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-parameterized?expand=0&rev=15
This commit is contained in:
Ana Guerrero 2023-08-16 12:16:32 +00:00 committed by Git OBS Bridge
commit 457555cb20
3 changed files with 33 additions and 1 deletions

24
fix-assert-method.patch Normal file
View 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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 15 09:02:40 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch fix-assert-method.patch:
* Use correct assertion method.
-------------------------------------------------------------------
Fri May 12 09:54:40 UTC 2023 - Matej Cepl <mcepl@suse.com>

View File

@ -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