Skip to content

gh-100746: Improve test_named_expressions.py #116713

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

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Mar 13, 2024

Two major changes:

  1. I removed pass where possible and instead used an assert for what we expect to happen
  2. I added dict-comprehensions testing by copy-pasting and modifing set-comprehension tests. Why? Because dict has key and value, we need to be sure that both work correctly.

Copy link
Member

@emilyemorehouse emilyemorehouse left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for getting more test coverage on this!

@sobolevn
Copy link
Member Author

Backport to 3.12 will be as-is, while 3.11 will be much smaller, because 3.11 does not have new binding logic from 3.12

Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

LGTM!

@sobolevn sobolevn merged commit 25684e7 into python:main Mar 13, 2024
@miss-islington-app
Copy link

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 13, 2024
(cherry picked from commit 25684e7)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 13, 2024

GH-116747 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Mar 13, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 13, 2024
(cherry picked from commit 25684e7)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 13, 2024

GH-116748 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Mar 13, 2024
sobolevn added a commit that referenced this pull request Mar 13, 2024
…16747)

gh-100746: Improve `test_named_expressions.py` (GH-116713)
(cherry picked from commit 25684e7)

Co-authored-by: Nikita Sobolev <[email protected]>
vstinner pushed a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants