You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
TODO: Make sure all documented have tests for CLI (others are not so important as it has not been decided what to do with them yet)
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
While working on #130160 and #93096 it was decided that 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:
tokenize(gh-131178: Add tests fortokenizecommand-line interface #131274)platform(gh-131524: Update platform CLI to use argparse #131542)pickle(gh-131178: Add tests forpicklecommand-line interface #131275)ast(gh-131178: Add tests forastcommand-line interface #133329)pickletools(gh-131178: Add tests forpickletoolscommand-line interface #131287)http.server(gh-131178: Add tests for http.server command-line interface #132540)profile(gh-131178: Add CLI tests for profile module #134103)cProfile(gh-131178: Add CLI tests for cProfile #134269)site( gh-131178: Add tests forsitecommand-line interface #133582)TODO: Make sure all documented have tests for CLI (others are not so important as it has not been decided what to do with them yet)
You can use PR #127759 for
dismodule or #118132 forrandommodule as a reference.And I also suggest using
subprocess.Popento allocate a separate resource since some modules can block a lot of time.Important
For those who want to work on the issue, please:
gh-131178: Add tests for `MODULE_NAME` command-line interfaceLinked PRs
tokenizecommand-line interface #131274picklecommand-line interface #131275pickletoolscommand-line interface #131287timeitCLI #131326astcommand-line interface #133329sitecommand-line interface #133582http.servercommand-line interface #134224http.servercommand-line interface #134279http.serverCLI #134287support.captured_stdoutandsupport.captured_stderr#137748test_unknown_flagfor platform CLI #137816sitecommand-line interface (GH-133582) #137832sitecommand-line interface (GH-133582) #137833sysconfigcommand-line interface #139934filecmpcommand-line interface #139947