Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add regression test for PySet_Contains#141411

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Carreau wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromCarreau:reg-test-gh-132657

Conversation

@Carreau
Copy link
Contributor

As discussed ingh-141183, the test suite did not
test thatPySet_Contains does not convert unhashable key into a frozenset.

This commit adds a regression test for this
behavior, to ensure that any behavior change is
caught by the test suite.

--

I'm not sure opening a GitHub issue, or having a blurb is necessary as this only adds a test.

Here is thelink to the comment where@kumaraditya303 suggested for me to send a test as a separate PR.

@python-cla-bot
Copy link

python-cla-botbot commentedNov 11, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

As discussed inpythongh-141183, the test suite did nottest that PySet_Contains does not convert unhashable keyinto a frozenset.This commit adds a regression test for thisbehavior, to ensure that any behavior change iscaught by the test suite.
staticPyObject*
test_set_contains_does_not_convert_unhashable_key(PyObject*self,PyObject*Py_UNUSED(obj))
{
// The documentation of PySet_Contains state:
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just add a link to docs, the code is self-explanatory of the behavior.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kumaraditya303kumaraditya303kumaraditya303 left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Carreau@kumaraditya303@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp