Copy as MarkdownCtrl+⇧+C
Phase 3 — Tests as Specification
Chapters 38, 39, 40, 41: Verify
Your role: Verifier — "I can define correct and prove it"
A type signature tells AI what shape the code should have. A test tells AI what it should do. Phase 3 teaches control flow (how code makes decisions and repeats), pytest (how you define "correct" before implementation exists), iterating on AI output (the feedback loop that makes TDG reliable), and error handling (anticipating what can go wrong). By the end, you write complete test suites that serve as the full specification AI implements against.
| # | Chapter | Key Focus |
|---|---|---|
| 38 | Control Flow — Through the Lens of Testing | How code makes decisions and repeats |
| 39 | pytest Deep Dive | Defining "correct" before implementation |
| 40 | Iterating on AI Output — The Feedback Loop | The cycle that makes TDG reliable |
| 41 | Error Handling and Exceptions | Anticipating what can go wrong |