Reliable Programs and an Intermediate Project
Verify behavior, investigate failures, document interfaces, and assemble a persistent command-line application.
Files, validation, data models, and virtual environments.
Test observable behavior with pytest, assemble a persistent task-tracker CLI with add/list/done commands, and ensure your program handles errors gracefully.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 10.01Testing with Unittest4 min
Turn behavioral requirements into repeatable examples that detect meaningful regressions.
- 10.02Debugging and Logging4 min
Investigate a failure systematically and leave useful operational evidence without overwhelming the reader.
- 10.03Type Hints and Protocols4 min
Document useful interfaces for people and static tools while retaining explicit runtime validation.
- 10.04Pytest and modern quality tools4 min
Move from a single test file to a repeatable workflow with fixtures, parametrization, coverage, linting, and type checks.
- 10.05Project: A Persistent Task TrackerProject4 min
Build a complete command-line task tracker with validated models, JSON persistence, predictable errors, and acceptance checks.
Ready to move on?
Add tasks, list them, mark them complete, and reload from storage; confirm that rejected input preserves the saved file and doesn't corrupt data.
Open the module self-check