MODULE 10 · INTERMEDIATE

Reliable Programs and an Intermediate ProjectPython · Module 10

Verify behavior, investigate failures, document interfaces, and assemble a persistent command-line application.

5 lessons20 min readingBuild reliable programs1 project
Free, self-paced, and open to everyone. No account needed.
WHAT THIS MODULE COVERS

Reliable Programs and an Intermediate Project

Verify behavior, investigate failures, document interfaces, and assemble a persistent command-line application.

BEFORE YOU START

Files, validation, data models, and virtual environments.

WHAT YOU’LL BE ABLE TO DO

Test observable behavior with pytest, assemble a persistent task-tracker CLI with add/list/done commands, and ensure your program handles errors gracefully.

THE LESSON SEQUENCE

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.

  1. 10.01
    Testing with Unittest

    Turn behavioral requirements into repeatable examples that detect meaningful regressions.

    4 min
  2. 10.02
    Debugging and Logging

    Investigate a failure systematically and leave useful operational evidence without overwhelming the reader.

    4 min
  3. 10.03
    Type Hints and Protocols

    Document useful interfaces for people and static tools while retaining explicit runtime validation.

    4 min
  4. 10.04
    Pytest and modern quality tools

    Move from a single test file to a repeatable workflow with fixtures, parametrization, coverage, linting, and type checks.

    4 min
  5. 10.05
    Project: A Persistent Task TrackerProject

    Build a complete command-line task tracker with validated models, JSON persistence, predictable errors, and acceptance checks.

    4 min
MODULE SELF-CHECK

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