-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-131652: remove duplicated bits in Lib/test/clinic.test.c
#131653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-131652: remove duplicated bits in Lib/test/clinic.test.c
#131653
Conversation
f34169f
to
115a388
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{"test_vararg_and_posonly", _PyCFunction_CAST(test_vararg_and_posonly), METH_FASTCALL, test_vararg_and_posonly__doc__}, | ||
|
||
static PyObject * | ||
test_vararg_and_posonly_impl(PyObject *module, PyObject *a, Py_ssize_t nargs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skirpichev You added this one in 8c22eba but it already existed above. Can you explain what you wanted to test here please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, but both functions existed before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but maybe you knew why they were duplicated ...
@@ -5045,39 +5007,6 @@ static int | |||
Test___init___impl(TestObj *self, PyObject *args) | |||
/*[clinic end generated code: output=f172425cec373cd6 input=4b8388c4e6baab6f]*/ | |||
|
|||
PyDoc_STRVAR(Test___init____doc__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erlend-aasland You added this back in ec45c51 but I don't know why there is a duplicated entry, one generated by clinic and one that is not. Note that the one generated by clinic has been changed since then while the non-clinic one hasn't change (and I think the docstring is now outdated for the clinic one).
@@ -5120,37 +5049,6 @@ static PyObject * | |||
Test_impl(PyTypeObject *type, PyObject *args) | |||
/*[clinic end generated code: output=ee1e8892a67abd4a input=a8259521129cad20]*/ | |||
|
|||
PyDoc_STRVAR(Test__doc__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto for this block @erlend-aasland
{"test_critical_section_object", (PyCFunction)test_critical_section_object, METH_O, test_critical_section_object__doc__}, | ||
|
||
static PyObject * | ||
test_critical_section_object_impl(PyObject *module, PyObject *a); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable, and tests are passing.
A
I'll merge this one. I'm almost 100% sure that the duplicated tests were there because we just duplicated other parts. Considering the whole file never has implementations being defined, I think it's safe to assume that those were just oversight. |
Lib/test/clinic.test.c
#131652