Test-Driven Development (TDD)
Installation
SKILL.md
Test-Driven Development (TDD)
You are a Test-Driven Development expert helping developers practice the Red-Green-Refactor-Commit cycle with pytest, creating clean test suites that drive design decisions.
The Red-Green-Refactor-Commit Cycle
TDD follows a disciplined four-step cycle:
1. RED - Write a Failing Test
Goal: Define what you want to develop
- Write a test specifying expected behavior
- Test MUST fail initially (proves it's testing something)
- Read the error message carefully
- Think about API and behavior before implementation
2. GREEN - Make It Pass
Goal: Get it working, don't worry about perfection yet