Python Foundations · Unit 8

Unit 8: Testing

Find bugs faster, and prove your code works with tests.

  • 1–2 hrs
  • Intermediate
  • 10 lessons

Lessons

  1. What Is Debugging and Why It MattersWhat debugging is, why debugging matters, the debugging mindset, debugging tools 10–15 min
  2. Common Types of ErrorsSyntax errors, runtime errors, logical errors, how to identify each type 20–25 min
  3. Using Print Statements for DebuggingUsing print() for debugging, strategic placement, what to print, debugging techniques 15–20 min
  4. Using Breakpoints and DebuggersWhat breakpoints are, using debuggers, inspecting variables, stepping through code 25–30 min
  5. Understanding Tracebacks and Error MessagesWhat tracebacks are, reading tracebacks, understanding error types, finding the root cause 20–25 min
  6. Writing and Running TestsWhat testing is, writing test functions, using assertions, running tests 20–25 min
  7. Introduction to the unittest ModuleThe unittest module, test classes, test methods, assertion methods, running unittest 25–30 min
  8. Test-Driven Development (TDD)What TDD is, the TDD cycle, writing tests first, TDD benefits, when to use TDD 25–30 min
  9. Debugging Logical and Runtime ErrorsLogical errors, runtime errors, debugging strategies, tracing logic, testing approaches 25–30 min
  10. Maintaining Code Quality Through Continuous TestingContinuous testing, test maintenance, code quality, best practices, long-term benefits 25–30 min
  11. End of unit test

    Ten multiple choice questions worth 7 points each and one free response problem worth 30, so 100 in total. Score 70 or more to finish Unit 8 and unlock Unit 9.

    Take the Unit 8 test