dev-python/parameterized: enable py3.12

Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Petr Vaněk
2023-05-31 18:06:44 +02:00
committed by Sam James
parent 664ed54947
commit 4796b33e27
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
Remove the usage of assertRaisesRegexp unit test alias removed in Python 3.12
Upstream-PR: https://github.com/wolever/parameterized/pull/169
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

@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{9..11} )
PYTHON_COMPAT=( pypy3 python3_{10..12} )
inherit distutils-r1 pypi
@@ -24,4 +24,8 @@ BDEPEND="
)
"
PATCHES=(
"${FILESDIR}/${P}-py312-test.patch"
)
distutils_enable_tests unittest