mirror of
https://github.com/python/cpython.git
synced 2025-10-26 19:24:34 +00:00
bpo-29951: Include function name for some error messages in PyArg_ParseTuple* (#916)
Also changed format specifier for function name from "%s" to "%.200s" and exception messages should start with lowercase letter.
This commit is contained in:
parent
a2a9ddd923
commit
64c8f705c0
4 changed files with 54 additions and 33 deletions
|
|
@ -1090,7 +1090,7 @@ def test_attributes(self):
|
|||
self.assertEqual(exc.name, 'somename')
|
||||
self.assertEqual(exc.path, 'somepath')
|
||||
|
||||
msg = "'invalid' is an invalid keyword argument for this function"
|
||||
msg = "'invalid' is an invalid keyword argument for ImportError"
|
||||
with self.assertRaisesRegex(TypeError, msg):
|
||||
ImportError('test', invalid='keyword')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue