Python Foundations · Unit 8
Unit 8: Testing
Find bugs faster, and prove your code works with tests.
Lessons
- What Is Debugging and Why It MattersWhat debugging is, why debugging matters, the debugging mindset, debugging tools
- Common Types of ErrorsSyntax errors, runtime errors, logical errors, how to identify each type
- Using Print Statements for DebuggingUsing print() for debugging, strategic placement, what to print, debugging techniques
- Using Breakpoints and DebuggersWhat breakpoints are, using debuggers, inspecting variables, stepping through code
- Understanding Tracebacks and Error MessagesWhat tracebacks are, reading tracebacks, understanding error types, finding the root cause
- Writing and Running TestsWhat testing is, writing test functions, using assertions, running tests
- Introduction to the unittest ModuleThe unittest module, test classes, test methods, assertion methods, running unittest
- Test-Driven Development (TDD)What TDD is, the TDD cycle, writing tests first, TDD benefits, when to use TDD
- Debugging Logical and Runtime ErrorsLogical errors, runtime errors, debugging strategies, tracing logic, testing approaches
- Maintaining Code Quality Through Continuous TestingContinuous testing, test maintenance, code quality, best practices, long-term benefits
-
Take the Unit 8 test
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.