diff options
author | Michael Seifert <michaelseifert04@yahoo.de> | 2017-04-09 07:47:12 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-09 07:47:12 (GMT) |
commit | 64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 (patch) | |
tree | 5f58baf5aa8ab19a167688c1710016291f5758ca /Lib/test/test_capi.py | |
parent | a2a9ddd923a849124bdd1c484f70f02df6fde0e9 (diff) | |
download | cpython-64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8.zip cpython-64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8.tar.gz cpython-64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 2a53f3d..6e14248 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -533,19 +533,19 @@ class SkipitemTest(unittest.TestCase): parse((1, 2, 3), {}, b'OOO', ['', '', 'a']) parse((1, 2), {'a': 3}, b'OOO', ['', '', 'a']) with self.assertRaisesRegex(TypeError, - r'Function takes at least 2 positional arguments \(1 given\)'): + r'function takes at least 2 positional arguments \(1 given\)'): parse((1,), {'a': 3}, b'OOO', ['', '', 'a']) parse((1,), {}, b'O|OO', ['', '', 'a']) with self.assertRaisesRegex(TypeError, - r'Function takes at least 1 positional arguments \(0 given\)'): + r'function takes at least 1 positional arguments \(0 given\)'): parse((), {}, b'O|OO', ['', '', 'a']) parse((1, 2), {'a': 3}, b'OO$O', ['', '', 'a']) with self.assertRaisesRegex(TypeError, - r'Function takes exactly 2 positional arguments \(1 given\)'): + r'function takes exactly 2 positional arguments \(1 given\)'): parse((1,), {'a': 3}, b'OO$O', ['', '', 'a']) parse((1,), {}, b'O|O$O', ['', '', 'a']) with self.assertRaisesRegex(TypeError, - r'Function takes at least 1 positional arguments \(0 given\)'): + r'function takes at least 1 positional arguments \(0 given\)'): parse((), {}, b'O|O$O', ['', '', 'a']) with self.assertRaisesRegex(SystemError, r'Empty parameter name after \$'): parse((1,), {}, b'O|$OO', ['', '', 'a']) |