Skip to content

gh-122292: Split up Lib/test/test_ast.py into a couple of files #122293

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 8 commits into from
Jul 29, 2024

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Jul 25, 2024

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

I like the idea of simplier tests. Backports are required, so we can manage this with ease in the future.

@Eclips4 Eclips4 added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Jul 25, 2024
raise SystemExit
unittest.main()

#### EVERYTHING BELOW IS GENERATED BY python Lib/test/test_ast/test_cases.py -g #####
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to put generated data in a separated file?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've decided to move the snippets and generated data to test_ast/snippets.py. I think it is better, so there is no need for an extra file test_snippets.py

@Eclips4 Eclips4 changed the title gh-122292: Split up Lib/test/test_ast.py into a Lib/test/test_ast/test_ast.py and Lib/test/test_ast/test_snippets.py gh-122292: Split up Lib/test/test_ast.py into a couple of files Jul 28, 2024
@Eclips4 Eclips4 requested a review from vstinner July 28, 2024 18:44
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@vstinner vstinner merged commit 9187484 into python:main Jul 29, 2024
32 checks passed
@miss-islington-app
Copy link

Thanks @Eclips4 for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @Eclips4 and @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 9187484dd97f6beb94fc17676014706922e380e1 3.13

@miss-islington-app
Copy link

Sorry, @Eclips4 and @vstinner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 9187484dd97f6beb94fc17676014706922e380e1 3.12

@vstinner
Copy link
Member

@Eclips4: It seems like the backport should be done manually. Can you do it for 3.13?

@Eclips4
Copy link
Member Author

Eclips4 commented Jul 29, 2024

@Eclips4: It seems like the backport should be done manually. Can you do it for 3.13?

Yes, I will do this! I'd also like to backport this to 3.12. Or do you think we should not backport this change to 3.12?

Eclips4 added a commit to Eclips4/cpython that referenced this pull request Jul 29, 2024
…le of files (pythonGH-122293)

(cherry picked from commit 9187484)

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

bedevere-app bot commented Jul 29, 2024

GH-122393 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 29, 2024
Eclips4 added a commit to Eclips4/cpython that referenced this pull request Jul 29, 2024
…le of files (pythonGH-122293)

(cherry picked from commit 9187484)

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

bedevere-app bot commented Jul 29, 2024

GH-122395 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 Jul 29, 2024
@Eclips4 Eclips4 deleted the split-ast-tests branch July 29, 2024 13:29
vstinner pushed a commit that referenced this pull request Jul 29, 2024
#122393)

[3.13] gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (GH-122293)
(cherry picked from commit 9187484)
vstinner pushed a commit that referenced this pull request Jul 29, 2024
#122395)

[3.12] gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (GH-122293)
(cherry picked from commit 9187484)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants