bpo-34193: Fix pluralization in getargs.c and test cases #8438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
I have changed the function names but I can change as per review comments
Added a new blurb. Let me know if the old one needs edit and can be re-used or to have the current one.
I have fixed the above ones and there were some test case failures in
test_capiandtest_getargswhich were fixed. Changes for 1799 line caused test case failures that were fixed.With respect to elements the code path is triggered only when fname is set as NULL and I couldn't find a function that passes fname as NULL. Almost all of them pass it as "" in case it's not present. I commented out the else block and tried running the test suite and had no failures. I think the code is not hit by any function. They were added as part of e4616e6 in 2001 and there are no test cases.
I tried looking into argument clinic docs to see if I can come up with a format string and function to hit the respective code paths for the patch. But understanding the format string is little difficult for me since the ones I can come up with generate error with required argument and not positional argument. I think test coverage could be improved in these and I also don't know if we have tests that hit this code but don't check for the error message. I will try my hands at
_testcapimodule.cto see if I can come up with tests. Any guidance on testing and argument clinic format string will be highly helpful.Thanks
https://bugs.python.org/issue34193