Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Description
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 fortokenize
command-line interface #131274)platform
(gh-131524: Update platform CLI to use argparse #131542)pickle
(gh-131178: Add tests forpickle
command-line interface #131275)ast
(gh-131178: Add tests forast
command-line interface #133329)pickletools
(gh-131178: Add tests forpickletools
command-line interface #131287)http.server
(gh-131178: Add tests for http.server command-line interface #132540)profile
(only has a test for successful/failure run)cProfile
(only has a test for invalid input)site
TODO: Make sureall 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 fordis
module or#118132 forrandom
module as a reference.
And I also suggest usingsubprocess.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
- gh-131178: Add tests for
tokenize
command-line interface #131274 - gh-131178: Add tests for
pickle
command-line interface #131275 - gh-131178: Add tests for
pickletools
command-line interface #131287 - gh-131178: Update help message for
timeit
CLI #131326 - gh-131178: Add tests for http.server command-line interface #132540
- gh-131178: Add tests for
ast
command-line interface #133329 - gh-131178: Add tests for
site
command-line interface #133582 - gh-131178: Add CLI tests for profile module #134103
- gh-131178: fix SSL tests for
http.server
command-line interface #134224 - gh-131178: Add CLI tests for cProfile #134269
- gh-131178: fix SSL tests for
http.server
command-line interface #134279 - gh-131178: remove runtime tests for
http.server
CLI #134287