-
-
Notifications
You must be signed in to change notification settings - Fork 323
Description
Description
The test_invalid_command fails specifically on Python 3.12. Interestingly, the test passes as expected on Python 3.10, 3.11, 3.13, and 3.14.
On Python 3.12, argparse produces an error message with single quotes around choices, but our current regression reference for 3.12 expects the "no-quote" format (which is the standard in 3.13+). This inconsistency causes a mismatch only in the 3.12 environment.
Steps to reproduce
- Use a Python 3.12.3 environment.
- Run the test suite:
uv run pytest tests/test_cli.py::test_invalid_command - Observe the
AssertionErrorfromfile_regression.check.
Current behavior
The test fails because the obtained output contains single quotes around the valid choices, whereas the reference file does not.
Diff output:
Desired behavior
The regression files for Python 3.12 should be standardized. We need to decide whether Python 3.12 should strictly follow the "no quotes" format or if the reference files need an update to accommodate the specific minor version of Python 3.12 being used.
Screenshots
Environment
Commitizen Version: 4.13.6
Python Version:
- Python 3.10.19, PASS
- Python 3.11.14, PASS
- Python 3.12.3, FAIL
- Python 3.13.12, PASS
- Python 3.14.3, PASS
Operating System: Linux