mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-107944: Improve error message for getargs with bad keyword arguments (#114792)
This commit is contained in:
parent
9e90313320
commit
17689e3c41
6 changed files with 113 additions and 29 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue