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

Add tests for command-line interface #131178

Open
5 tasks
donBarbos opened this issue Mar 13, 2025 · 2 comments
Open
5 tasks

Add tests for command-line interface #131178

donBarbos opened this issue Mar 13, 2025 · 2 comments
Assignees
Labels
easy tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@donBarbos
Copy link
Contributor

donBarbos commented Mar 13, 2025

While working on #130160 and #93096 I thought it would be worth paying attention to the problem of lack of tests for command line interface.

List of all cli modules is in the documentation: https://docs.python.org/dev/library/cmdline.html

Many modules are missing command line interface tests, so I suggest using this issue to submit PRs for now only for well-documented interfaces, for example:

You can use PR #127759 for dis module or #118132 for random module as a reference.
And I also suggest using subprocess.Popen to allocate a separate resource since some modules can block a lot of time.

Important

For those who want to work on the issue, please:

  • Select one module for which tests will be improved. It's easier to review and backport.
  • Open a pull request with the following title: gh-131178: Add tests for `MODULE_NAME` command-line interface

Linked PRs

@picnixz picnixz added type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Mar 13, 2025
@hugovk
Copy link
Member

hugovk commented Mar 13, 2025

See also the tests added in #118132, based on https://pythontest.com/testing-argparse-apps/

@sobolevn
Copy link
Member

@donBarbos I assigned this issue to you, since you mentioned that you are working on it :)

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

No branches or pull requests

4 participants