Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-94808: add tests covering PySequence_[InPlace_]Repeat#99196
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4829,6 +4829,30 @@ sequence_del_slice(PyObject* self, PyObject *args) | ||
| Py_RETURN_NONE; | ||
| } | ||
| static PyObject * | ||
| sequence_repeat(PyObject* self, PyObject *args) | ||
| { | ||
| PyObject *sequence; | ||
| Py_ssize_t count; | ||
| if (!PyArg_ParseTuple(args, "On", &sequence, &count)) { | ||
| return NULL; | ||
| } | ||
| return PySequence_Repeat(sequence, count); | ||
| } | ||
| static PyObject * | ||
| sequence_inplace_repeat(PyObject* self, PyObject *args) | ||
| { | ||
| PyObject *sequence; | ||
| Py_ssize_t count; | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PEP 7: blank line after local variable declarations;) | ||
| if (!PyArg_ParseTuple(args, "On", &sequence, &count)) { | ||
| return NULL; | ||
| } | ||
| return PySequence_InPlaceRepeat(sequence, count); | ||
| } | ||
| static PyObject * | ||
| test_pythread_tss_key_state(PyObject *self, PyObject *args) | ||
| { | ||
| @@ -6376,6 +6400,8 @@ static PyMethodDef TestMethods[] = { | ||
| {"mapping_has_key", mapping_has_key, METH_VARARGS}, | ||
| {"sequence_set_slice", sequence_set_slice, METH_VARARGS}, | ||
| {"sequence_del_slice", sequence_del_slice, METH_VARARGS}, | ||
| {"sequence_repeat", sequence_repeat, METH_VARARGS}, | ||
| {"sequence_inplace_repeat", sequence_inplace_repeat, METH_VARARGS}, | ||
| {"test_pythread_tss_key_state", test_pythread_tss_key_state, METH_VARARGS}, | ||
| {"hamt", new_hamt, METH_NOARGS}, | ||
| {"bad_get", _PyCFunction_CAST(bad_get), METH_FASTCALL}, | ||
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.
And here.