[Python-checkins] bpo-46431: use raw string for regex in test (GH-30901)

iritkatriel webhook-mailer at python.org
Tue Jan 25 18:53:08 EST 2022


https://github.com/python/cpython/commit/072f4a473e861c6c987650f08990c0ed1f76715f
commit: 072f4a473e861c6c987650f08990c0ed1f76715f
branch: main
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2022-01-25T23:52:43Z
summary:

bpo-46431: use raw string for regex in test (GH-30901)

files:
M Lib/test/test_exception_group.py

diff --git a/Lib/test/test_exception_group.py b/Lib/test/test_exception_group.py
index bbfce944c1765..b7b53bb2f0ece 100644
--- a/Lib/test/test_exception_group.py
+++ b/Lib/test/test_exception_group.py
@@ -22,7 +22,7 @@ def test_exception_group_is_generic_type(self):
 
 class BadConstructorArgs(unittest.TestCase):
     def test_bad_EG_construction__too_many_args(self):
-        MSG = 'BaseExceptionGroup.__new__\(\) takes exactly 2 arguments'
+        MSG = r'BaseExceptionGroup.__new__\(\) takes exactly 2 arguments'
         with self.assertRaisesRegex(TypeError, MSG):
             ExceptionGroup('no errors')
         with self.assertRaisesRegex(TypeError, MSG):



More information about the Python-checkins mailing list