Skip to content

gh-161354: Fix test_ast.test_nodes_have_inline_values() - #161406

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_ast
Nov 5, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:test_ast

Conversation

@vstinner

@vstinner vstinner commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Run the test in a subprocess to make it more deterministic.

Run the test in a subprocess to make it more deterministic.
@vstinner

vstinner commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@lysnikolaou @pablogsal: Would you mind to review my fix?

@lysnikolaou

Copy link
Copy Markdown
Member

I know I added that test but I'm now wondering whether we actually want that test since it tests an internal implementation detail. If yes, then this LGTM.

@vstinner

vstinner commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

I know I added that test but I'm now wondering whether we actually want that test since it tests an internal implementation detail.

IMO the test is worth it. It checks that the implementation works as expected. Testing _testinternalcapi.has_inline_values() is the good way to check if inline values are used.

@lysnikolaou lysnikolaou 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.

Let's get it in then.

@vstinner
vstinner enabled auto-merge (squash) November 5, 2026 10:59
@vstinner
vstinner merged commit 429fd0a into python:main Nov 5, 2026
60 checks passed
@vstinner
vstinner deleted the test_ast branch November 5, 2026 11:05
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