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
{{ message }}
Repository navigation
Bug: test_invalid_command fails on Python 3.12 #1864
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 AssertionError from file_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.
This is indeed an interesting finding.
I think the simplest migration is to upgrade python 3.12 to the latest version in your environment.
The test passes in python 3.12.10+ env and fails <= 3.12.6 in my environment (I haven't done a full binary search)
@noirbizarre wdyt? Should we just skip the test in python 3.12?
Activity
bearomorphism commentedon Feb 10, 2026
I have discussed offline with @lostinth1cho
The behavior of the test in python 3.12 is interesting
bearomorphism commentedon Feb 10, 2026
My terminal output:
bearomorphism commentedon Feb 10, 2026
This is indeed an interesting finding.
I think the simplest migration is to upgrade python 3.12 to the latest version in your environment.
The test passes in python 3.12.10+ env and fails <= 3.12.6 in my environment (I haven't done a full binary search)
@noirbizarre wdyt? Should we just skip the test in python 3.12?
test(cli): skip invalid-command snapshot on Python 3.12.0-3.12.6 (#1982)