From 64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 9 Apr 2017 09:47:12 +0200 Subject: 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. --- Lib/test/test_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_exceptions.py') diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index e6fa34610d0..3378ceb701c 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1090,7 +1090,7 @@ class ImportErrorTests(unittest.TestCase): 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') -- cgit v1.2.3