|
rdobuilder |
8f5ab9 |
From d64843df5f339f486a9b29d492f2988a3bf8485b Mon Sep 17 00:00:00 2001
|
|
rdobuilder |
8f5ab9 |
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
|
|
rdobuilder |
8f5ab9 |
Date: Tue, 2 May 2023 13:48:00 +0200
|
|
rdobuilder |
8f5ab9 |
Subject: [PATCH] Remove the usage of assertRaisesRegexp unit test alias
|
|
rdobuilder |
8f5ab9 |
removed in Python 3.12
|
|
rdobuilder |
8f5ab9 |
|
|
rdobuilder |
8f5ab9 |
https://bugs.python.org/issue?@action=redirect&bpo=45162
|
|
rdobuilder |
8f5ab9 |
---
|
|
rdobuilder |
8f5ab9 |
parameterized/test.py | 2 +-
|
|
rdobuilder |
8f5ab9 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
rdobuilder |
8f5ab9 |
|
|
rdobuilder |
8f5ab9 |
diff --git a/parameterized/test.py b/parameterized/test.py
|
|
rdobuilder |
8f5ab9 |
index 6c71f79..498c591 100644
|
|
rdobuilder |
8f5ab9 |
--- a/parameterized/test.py
|
|
rdobuilder |
8f5ab9 |
+++ b/parameterized/test.py
|
|
rdobuilder |
8f5ab9 |
@@ -35,7 +35,7 @@ def assert_raises_regexp_decorator(expected_exception, expected_regexp):
|
|
rdobuilder |
8f5ab9 |
def func_decorator(func):
|
|
rdobuilder |
8f5ab9 |
@wraps(func)
|
|
rdobuilder |
8f5ab9 |
def wrapper(self, *args, **kwargs):
|
|
rdobuilder |
8f5ab9 |
- with self.assertRaisesRegexp(expected_exception, expected_regexp):
|
|
rdobuilder |
8f5ab9 |
+ with self.assertRaisesRegex(expected_exception, expected_regexp):
|
|
rdobuilder |
8f5ab9 |
func(self, *args, **kwargs)
|
|
rdobuilder |
8f5ab9 |
|
|
rdobuilder |
8f5ab9 |
return wrapper
|