Title: test: normalize argparse choice snapshots by puneetdixit200 · Pull Request #2000 · commitizen-tools/commitizen · GitHub
Open Graph Title: test: normalize argparse choice snapshots by puneetdixit200 · Pull Request #2000 · commitizen-tools/commitizen
X Title: test: normalize argparse choice snapshots by puneetdixit200 · Pull Request #2000 · commitizen-tools/commitizen
Description: Description Fixes #1990 by normalizing only the volatile argparse (choose from ...) choice list before the invalid-command snapshot assertion. This lets the invalidCommand parametrization run again on Python 3.14.5+, while keeping the command failure, usage output, and invalid value covered. Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (OpenAI GPT-5) Generated-by: OpenAI GPT-5 following the guidelines Code Changes Add test cases to all the changes you introduce Run uv run poe all locally to ensure this change passes linter check and tests Manually test the changes: Verify the feature/bug fix works as expected in real-world scenarios Test edge cases and error conditions Ensure backward compatibility is maintained Document any manual testing steps performed Update the documentation for the changes Documentation Changes No documentation changes. Run uv run poe doc locally to ensure the documentation pages renders correctly Check and fix any broken links (internal or external) Expected Behavior tests/test_cli.py::test_invalid_command[invalidCommand] should pass across Python patch releases that differ only in whether argparse quotes the choose from entries. Steps to Test This Pull Request UV_CACHE_DIR=$PWD/.uv-cache UV_PROJECT_ENVIRONMENT=$PWD/.venv314 uv run --python python3.14 --group test pytest tests/test_cli.py::test_normalize_argparse_choice_quotes tests/test_cli.py::test_invalid_command -q UV_CACHE_DIR=$PWD/.uv-cache UV_PROJECT_ENVIRONMENT=$PWD/.venv314 uv run --python python3.14 ruff check tests/test_cli.py UV_CACHE_DIR=$PWD/.uv-cache UV_PROJECT_ENVIRONMENT=$PWD/.venv314 uv run --python python3.14 ruff format --check tests/test_cli.py git diff --check Additional Context I did not run the full uv run poe all suite locally because this change is isolated to tests/test_cli.py and the targeted Python 3.14.5 regression plus ruff checks cover the changed behavior.
Open Graph Description: Description Fixes #1990 by normalizing only the volatile argparse (choose from ...) choice list before the invalid-command snapshot assertion. This lets the invalidCommand parametrization run again...
X Description: Description Fixes #1990 by normalizing only the volatile argparse (choose from ...) choice list before the invalid-command snapshot assertion. This lets the invalidCommand parametrization run again...
Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/2000
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:30077e04-4abf-e3c8-94ed-be11b43d1e76 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 844A:3FF0AC:547AA1:72622D:6A4DA774 |
| html-safe-nonce | 2e224c0f74844024b934c9b14068b27e9747303fb494aa6e3199d1bbae40670e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDRBOjNGRjBBQzo1NDdBQTE6NzI2MjJEOjZBNERBNzc0IiwidmlzaXRvcl9pZCI6IjQ1NjQzMjU0ODQ1NTczNDY2NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2c68b40a3208a88260a9a158bd303183e8ec18068ea47d285c23e9901142e833 |
| hovercard-subject-tag | pull_request:3722806209 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/commitizen-tools/commitizen/pull/2000/files |
| twitter:image | https://avatars.githubusercontent.com/u/236133619?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/236133619?s=400&v=4 |
| og:image:alt | Description Fixes #1990 by normalizing only the volatile argparse (choose from ...) choice list before the invalid-command snapshot assertion. This lets the invalidCommand parametrization run again... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 47723578ce6819210724ef064c858fce6d3115a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width