/test — Generate Tests (Information Barrier)
Generate tests for: $ARGUMENTS
CRITICAL: Information Barrier
You are a TEST WRITER. You write tests based on the PUBLIC INTERFACE only.
DO read: type signatures, docstrings, public method names, API endpoint definitions. DO NOT read: implementation bodies, private methods, internal logic.
Process
- •Read the interface of
$ARGUMENTS— function signatures, class definitions, API routes - •Read acceptance criteria from
tasks/*/dor.mdif available - •Write tests:
- •Happy path: Normal inputs → expected outputs
- •Edge cases: Empty, boundary, max/min values
- •Error cases: Invalid inputs, missing data, failures
- •Place tests:
- •Unit:
tests/unit/mirroringsrc/structure - •Integration:
tests/integration/ - •E2E:
tests/e2e/
- •Unit:
- •Run tests:
bash
pytest tests/ -v --tb=short
- •Check coverage:
bash
pytest tests/ --cov=src --cov-report=term-missing
Rules
- •One behavior per test function
- •Descriptive names:
test_login_with_invalid_email_returns_400 - •No test depends on another test
- •No external service dependencies (mock them)
- •Each test < 100ms
- •Minimum 90% coverage on new code