FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-94808: add tests covering `PySequence_[InPlace_]Repeat` by sobolevn · Pull Request #99196 · python/cpython · GitHub

/ cpython Public

gh-94808: add tests covering PySequence_[InPlace_]Repeat - #99196

Open
sobolevn wants to merge 2 commits into
python:mainfrom
sobolevn:cover-sequence-repeat
Open

gh-94808: add tests covering PySequence_[InPlace_]Repeat#99196
sobolevn wants to merge 2 commits into
python:mainfrom
sobolevn:cover-sequence-repeat

Conversation

sobolevn commented Nov 7, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Things I've skipped:

  1. NULL checks for PyLong allocation and NULL check for self. Cannot be reproduced from python
  2. Different values and corner cases for sq_repeat and sq_inplace_repeat, I expect them to be covered in * and *= operators

Coverage view before:

Copy link
Copy Markdown
Member Author

Merge conflicts are resolved, @serhiy-storchaka would you mind taking a look? :)

skirpichev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Comment thread Modules/_testcapimodule.c
sequence_inplace_repeat(PyObject* self, PyObject *args)
{
PyObject *sequence;
Py_ssize_t count;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

PEP 7: blank line after local variable declarations;)

Comment thread Modules/_testcapimodule.c
sequence_repeat(PyObject* self, PyObject *args)
{
PyObject *sequence;
Py_ssize_t count;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

And here.

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review skip news stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL