Skip to content

faircode/report.py has no dedicated test coverage #130

Description

@yakew7

Neither to_html() (the profile HTML report) nor the newer compare_to_html() (#128) have any test coverage - there's no tests/test_report.py, and no other test file exercises HTML report generation at all.

That means a structural regression (an unclosed tag, a KeyError from a field profile()/compare() renamed, a broken f-string) would ship silently - CI is green today even though this code path has zero verification beyond a manual faircode profile --html/faircode compare --html smoke test.

Request: add tests/test_report.py with at least:

  • a smoke test per function asserting well-formed output (valid <!DOCTYPE>, balanced tags, no unescaped user data)
  • a couple of assertions that key computed figures (score, PSI, drift level) actually appear in the rendered HTML, so a silent field-name drift is caught

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions