GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-94808: add tests covering `PySequence_[InPlace_]Repeat` by sobolevn · Pull Request #99196 · python/cpython Conversation
|
|
Merge conflicts are resolved, @serhiy-storchaka would you mind taking a look? :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good, except for few pep7 nitpicks.
On another hand, I'm not sure if this is a right approach to test abstract interfaces. Another example is PyNumber_* API (#111996). Maybe we should use special, dedicated just for tests types, that have required magic methods, instead of using core types?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| sequence_inplace_repeat(PyObject* self, PyObject *args) | ||
| { | ||
| PyObject *sequence; | ||
| Py_ssize_t count; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
PEP 7: blank line after local variable declarations;)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| sequence_repeat(PyObject* self, PyObject *args) | ||
| { | ||
| PyObject *sequence; | ||
| Py_ssize_t count; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
And here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Reopening. This was prematurely closed because the meta issue was misidentified as a simple issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Muse Code (Meta Muse Spark) # Conflicts: # Lib/test/test_capi/test_misc.py # Modules/_testcapimodule.c
Drop the basic repeat/in-place-repeat tests: test_abstract.py now covers those paths via _testlimitedcapi (including corner counts, MemoryError, TypeError and NULL cases). Keep the subtype and error tests unique to this PR. Add test_sequence_repeat_numeric_fallback for the previously untested nb_multiply fallback in PySequence_Repeat. Assert exact result types with assertIs: comparing against CustomList(...) only checks contents, and repeat of a builtin subtype returns the exact builtin type. Co-authored-by: Muse Code (Meta Muse Spark)
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.