Skip to content
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

Split test_dis into a directory by separating generated content #123361

Open
sobolevn opened this issue Aug 26, 2024 · 0 comments
Open

Split test_dis into a directory by separating generated content #123361

sobolevn opened this issue Aug 26, 2024 · 0 comments
Assignees
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@sobolevn
Copy link
Member

sobolevn commented Aug 26, 2024

Feature or enhancement

This issue suggests to continue my work on having better tests and better test structure: #108303
Recently we had a big upgrade in test_ast when we splitted the generate tests from the actual tests: #122292

Right now test_dis also has this problem. There are around 300 lines of generated code in test_dis.py.

I suggest to:

  1. Create a test_dis directory
  2. Move generated content to test_dis/snippets.py
  3. Allow ./python.exe Lib/test/test_dis/snippets.py to always output new snippets to simplify the development, we would no longer need to uncomment / comment this line:
    # from test.test_dis import _prepare_test_cases; _prepare_test_cases()
  4. Keep everything else as it is for now, later we can continue to work on test_dis should test the dis module, not everything else #90916
  5. Keep the history as much as possible
  6. Create manual backports for this feature to 3.12 and 3.13, so we won't have any problems with backporting bug fixes to test_dis.py

I have a PR ready. Please, take a look and discuss!

Linked PRs

@sobolevn sobolevn added type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Aug 26, 2024
@sobolevn sobolevn self-assigned this Aug 26, 2024
sobolevn added a commit to sobolevn/cpython that referenced this issue Aug 26, 2024
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

6 participants
@sobolevn and others