Skip to content

Split up Lib/test/test_ast.py #122292

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

Closed
Eclips4 opened this issue Jul 25, 2024 · 1 comment
Closed

Split up Lib/test/test_ast.py #122292

Eclips4 opened this issue Jul 25, 2024 · 1 comment
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@Eclips4
Copy link
Member

Eclips4 commented Jul 25, 2024

Feature or enhancement

Proposal:

Lib/test/test_ast.py currently contains a ast test cases, and code-generated data such as exec_results, eval_results and single_results.

I propose to move the snippets which are used to generate these variables and the code which is generated into a separate file.

The test_ast directory would look like this:

  • test_ast/test_ast.py - the previous version of test_ast.py but without the snippets and code-generation
  • test_ast/test_cases.py - contains the snippets and code-generation

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@Eclips4 Eclips4 added type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Jul 25, 2024
Eclips4 added a commit to Eclips4/cpython that referenced this issue Jul 29, 2024
…le of files (pythonGH-122293)

(cherry picked from commit 9187484)

Co-authored-by: Kirill Podoprigora <[email protected]>
Eclips4 added a commit to Eclips4/cpython that referenced this issue Jul 29, 2024
…le of files (pythonGH-122293)

(cherry picked from commit 9187484)

Co-authored-by: Kirill Podoprigora <[email protected]>
vstinner pushed a commit that referenced this issue 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 issue 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)
@vstinner
Copy link
Member

The issue is now implemented. Thanks @Eclips4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants