[claude] Add unit tests for agent_health.py (#1195) #1203
Reference in New Issue
Block a user
Delete Branch "claude/issue-1195"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1195
Adds 41 unit tests for
src/timmy/vassal/agent_health.pywhich had 288 lines and 0 test coverage.What was added
_issue_created_time— valid/invalid/missing timestamp handling_fetch_labeled_issues— success, HTTP errors, network exceptions, PR filtering_last_comment_time— comments present/absent, fallback fields, error casescheck_agent_health— unknown agent, Gitea disabled, stuck detection, active-not-stuck, created_at fallback, exception handlingget_full_health_report— structure and agent rosternudge_stuck_agent— success (201), failure (500), disabled Gitea, network exceptionsAll tests use
unittest.mockto avoid hitting live Gitea;pytestmark = pytest.mark.unitensures inclusion intox -e unit. Suite grows from 302 → 343 passing.