Message295389
As I was trying to test coverage for a few places where the same error was built, I have discovered another issue where the error message is very misleading:
AssertionError: "^index\(\) takes no keyword arguments$" does not match "index() takes at least 1 argument (0 given)"
def test_varargs4_kw(self):
msg = r"^index\(\) takes no keyword arguments$"
self.assertRaisesRegex(TypeError, msg, [].index, x=2)
Should I open another ticket to track this ?
Anyway, so far, I have reached the following conclusion regarding the test coverage:
Objects/call.c:551: "%.200s() takes no keyword arguments" => TESTED
(In _PyMethodDef_RawFastCallDict)
Objects/call.c:690: "%.200s() takes no keyword arguments" => Not tested
(In _PyMethodDef_RawFastCallKeywords)
Objects/call.c:737: PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments" => Not tested
(In cfunction_call_varargs)
Python/getargs.c:2508: PyErr_Format(PyExc_TypeError, "%.200s takes no keyword arguments" => TESTED (Now)
(In _PyArg_NoKeywords)
Python/getargs.c:2525: PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments" => Not tested
(In _PyArg_NoStackKeywords)
Any suggestion regarding how to test what is not tested is more than welcome. |
|
Date |
User |
Action |
Args |
2017-06-08 10:01:43 | SylvainDe | set | recipients:
+ SylvainDe, serhiy.storchaka |
2017-06-08 10:01:43 | SylvainDe | set | messageid: <1496916103.64.0.0986195266158.issue30592@psf.upfronthosting.co.za> |
2017-06-08 10:01:43 | SylvainDe | link | issue30592 messages |
2017-06-08 10:01:42 | SylvainDe | create | |
|