Skip to content

test: expand Python backend coverage to ~52%#12

Merged
gf5901 merged 1 commit into
mainfrom
test/expand-coverage
Mar 23, 2026
Merged

test: expand Python backend coverage to ~52%#12
gf5901 merged 1 commit into
mainfrom
test/expand-coverage

Conversation

@gf5901
Copy link
Copy Markdown
Owner

@gf5901 gf5901 commented Mar 23, 2026

Summary

  • Add targeted tests for under-covered modules: PR verification/body generation, health router edge cases, watcher loop resilience, worktree/agent context helpers, PM agent normalization, and healer stale-worktree cleanup
  • Extract shared test helpers into tests/support.py (mock_process, git_cmd_side_effect, attach_pr_mocks) to reduce boilerplate in PR pipeline tests
  • Move the FastAPI client fixture from test_api.py into conftest.py so all API test files can reuse it
  • Fix flaky watcher loop test by using asyncio.Event signaling instead of wall-clock sleep
  • Remove duplicate empty-project-id DynamoDB test

Coverage: ~48% → ~52% overall; notable jumps in pr.py (39→76%), agent.py (55→63%), watcher.py (59→91%), pm_agent.py (0→29%), healer.py (70→88%).

Test plan

  • Full pytest tests/ suite passes locally (381 passed)
  • ruff check clean on all new/modified files
  • No production code changes — test-only diff

Made with Cursor

Add focused tests for PR verification/body generation, health edge cases, worktree and agent context helpers, and PM/healer utilities. Extract shared test helpers and make the watcher loop test deterministic while removing duplicated Dynamo store coverage.

Made-with: Cursor
@gf5901 gf5901 merged commit 349ec9e into main Mar 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant