Write Tests

Write tests for the code changes on the current branch, then run them until they pass.

bd73-com updated 2mo ago
Claude CodeGeneric
View source ↗
Write tests for the code changes on the current branch, then run them until they pass.

## Instructions

1. Run `git diff main...HEAD` to identify changed files and functions.
2. For each changed file, read the full file and its existing test file (if any).
3. Identify untested or under-tested code paths:
   - New functions or methods
   - New branches (if/else, conditions)
   - Edge cases and error paths
   - Boundary conditions
4. Write tests following existing patterns:
   - pytest + pytest-asyncio
   - Mock all external I/O (yfinance, httpx, Anthropic client) with unittest.mock
   - Tests live in `tests/` mirroring the `src/obx/` layout
5. Run: `uv run pytest <test-file> -v`
6. If any test fails, fix it and re-run until all pass.
7. Report final test count and pass/fail status.

Do not write trivial tests. Focus on meaningful coverage of changed code.

Maintain Write Tests?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Write Tests on getagentictools](https://getagentictools.com/loops/bd73-com-write-tests?ref=badge)
npx agentictools info loops/bd73-com-write-tests

The second line is the CLI lookup for this page — handy in READMEs and docs.