aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>2024-02-08 01:04:41 -0800
committerGitHub <noreply@github.com>2024-02-08 01:04:41 -0800
commit17689e3c41d9f61bcd1928b24d3c50c37ceaf3f2 (patch)
tree7b7bd7681ee4810ba68527324a96093e2a21fb24 /Lib/test/test_exceptions.py
parent9e90313320a2af2d9ff7049ed3842344ed236630 (diff)
downloadcpython-17689e3c41d9f61bcd1928b24d3c50c37ceaf3f2.tar.gz
cpython-17689e3c41d9f61bcd1928b24d3c50c37ceaf3f2.zip
gh-107944: Improve error message for getargs with bad keyword arguments (#114792)
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index c57488e44ae..c7e76414ff0 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -1917,7 +1917,7 @@ class ImportErrorTests(unittest.TestCase):
self.assertEqual(exc.name, 'somename')
self.assertEqual(exc.path, 'somepath')
- msg = "'invalid' is an invalid keyword argument for ImportError"
+ msg = r"ImportError\(\) got an unexpected keyword argument 'invalid'"
with self.assertRaisesRegex(TypeError, msg):
ImportError('test', invalid='keyword')