Syllabus

  1. 01ExceptionsRead tracebacks, handle exceptions precisely, use else and finally for cleanup, raise, re-raise, chain and annotate errors, design custom exception hierarchies, and work with warnings and exception groups.7 lessons
    1. 01Exceptions and tracebacks
    2. 02Handling exceptions precisely
    3. 03else, finally and guaranteed cleanup
    4. 04Raising, re-raising, chaining and notes
    5. 05Designing custom exceptions
    6. 06Warnings and exception groups
    7. 07Exceptions quiz
  2. 02Unit testingAutomate your checks with unittest: assert, test cases and runners, the right assertion methods, fixtures and cleanups, subtests, skips and expected failures, and mocks for isolating dependencies.7 lessons
    1. 01Why automated tests, and assert
    2. 02Writing tests with unittest
    3. 03Choosing assertion methods
    4. 04Fixtures and cleanup
    5. 05Subtests, skipping and expected failures
    6. 06Isolating code with mocks
    7. 07Unit testing quiz
  3. 03ProjectPut exceptions and unit tests to work: pin down a buggy class's rules with tests, use them to find the bugs, and fix the code.2 lessons
    1. 01Project: test-driven bug hunt
    2. 02Project review quiz