Follow-up from #116
--fail-under uses a strict < comparison, so a score exactly equal to the threshold is supposed to pass (exit 0) per the README ("Scores at or above the threshold keep the existing successful exit"). The current tests in tests/test_cli.py only cover:
- score below threshold -> exit 1
- score well above threshold -> exit 0
There is no test for the exact-equality case (overall_score == fail_under), which is the actual edge of the documented contract.
Suggested fix
Add a case to test_cli.py that constructs a dataset whose overall_score exactly equals the --fail-under value passed in, and asserts exit_code == 0.
Follow-up from #116
--fail-underuses a strict<comparison, so a score exactly equal to the threshold is supposed to pass (exit 0) per the README ("Scores at or above the threshold keep the existing successful exit"). The current tests intests/test_cli.pyonly cover:There is no test for the exact-equality case (
overall_score == fail_under), which is the actual edge of the documented contract.Suggested fix
Add a case to
test_cli.pythat constructs a dataset whoseoverall_scoreexactly equals the--fail-undervalue passed in, and assertsexit_code == 0.