Back to the map
Course 12 · Advanced
Type Hints & Testing
Describe your code's contracts and prove it works
Big programs stay healthy when their interfaces are clear and their behavior is checked automatically. You'll learn to describe data with type hints (generics, TypedDict, Protocol and friends), then write real tests with assert, unittest, mocks and doctest, and finish by rescuing a buggy legacy library, armed only with tests.
- Chapter 1
Describe Interfaces
Type hints: labels that tell humans and tools what your code expects.
0/7 - Chapter 2
Test Behavior
Write code that checks your code: assert, unittest, mocks and doctest.
0/7 - Chapter 3
Improve Safely
Edge cases, property tests, red-green-refactor and testable design.
0/4