Skip to content

profile --fail-under: add test for exact score == threshold boundary #117

Description

@yakew7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions