Title: Add tests for command-line interface · Issue #131178 · python/cpython · GitHub
Open Graph Title: Add tests for command-line interface · Issue #131178 · python/cpython
X Title: Add tests for command-line interface · Issue #131178 · python/cpython
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/c...
Open Graph 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 documentatio...
X 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 documentatio...
Opengraph URL: https://github.com/python/cpython/issues/131178
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add tests for command-line interface","articleBody":"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.\n\nList of all cli modules is in the documentation: https://docs.python.org/dev/library/cmdline.html\n\nMany 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:\n\n- [x] `tokenize` (gh-131274)\n- [x] `platform` (gh-131542)\n- [x] `pickle` (gh-131275)\n- [x] `ast` (gh-133329)\n- [x] `pickletools` (gh-131287)\n- [x] `http.server` (gh-132540)\n- [ ] `profile` (gh-134103)\n- [ ] `cProfile` (gh-134269)\n- [x] `site` (gh-133582)\n\nTODO: Make sure [all documented](https://docs.python.org/dev/library/cmdline.html) have tests for CLI (others are not so important as it has not been decided what to do with them yet)\n\nYou can use PR #127759 for `dis` module or #118132 for `random` module as a reference.\nAnd I also suggest using `subprocess.Popen` to allocate a separate resource since some modules can block a lot of time.\n\n\u003e [!IMPORTANT]\n\u003e For those who want to work on the issue, please:\n\u003e * Select one module for which tests will be improved. It's easier to review and backport.\n\u003e * Open a pull request with the following title: `` gh-131178: Add tests for `MODULE_NAME` command-line interface ``\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-131274\n* gh-131275\n* gh-131287\n* gh-131326\n* gh-132540\n* gh-133329\n* gh-133582\n* gh-134103\n* gh-134224\n* gh-134269\n* gh-134279\n* gh-134287\n* gh-137748\n* gh-137807\n* gh-137816\n* gh-137832\n* gh-137833\n* gh-139934\n* gh-139947\n* gh-139983\n* gh-140199\n* gh-140200\n* gh-143835\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/donbarbos","@type":"Person","name":"donbarbos"},"datePublished":"2025-03-13T09:15:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/131178/cpython/issues/131178"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8558f24a-5a7c-2e2a-4d46-72a7c6d4fc6b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBEC:3A35C6:22DB56D:2DC85CE:696B1128 |
| html-safe-nonce | 7d140238e58ca96782e0c8fd3c5adacebf754c141b86f41c0b710044c372645d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkVDOjNBMzVDNjoyMkRCNTZEOjJEQzg1Q0U6Njk2QjExMjgiLCJ2aXNpdG9yX2lkIjoiNTk1MzQ1ODU0MjQ3ODAzNzI4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 354fa740894b39fb9b3185275b2bfc468bf324d17d51518a8f68922033f1047c |
| hovercard-subject-tag | issue:2916421465 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/131178/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43e0e5c04bec52f8e9d1daaf9547fc30defdafa10e5bb771222c8138a2406aa7/python/cpython/issues/131178 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43e0e5c04bec52f8e9d1daaf9547fc30defdafa10e5bb771222c8138a2406aa7/python/cpython/issues/131178 |
| og:image:alt | 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 documentatio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | donbarbos |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width