Every project can benefit from testing and Python's testing library is solid, strong, and easy to learn and use. In this course, we'll learn about doctests, Python's unittest library, and the super-handy third-party package coverage.py. Come along and learn to assert yourself!
Testing is often a daunting subject. Let's break down some of the common words and then learn about the two basic types of testing in Python, doctests and unit tests.
Chevron 5 steps1:54
12:11
1 objective
5:41
2 objectives
Now that we know how to start a TestCase, let's look at some of the assertions that Python provides us with.
Chevron 6 steps6:30
2 objectives
8:08
2 objectives
3:27
2 objectives
Writing tests is great but you still need to know when you've tested enough and when you're missing something important. Coverage.py gives us very useful feedback to judge how effective our testing is.
Chevron 3 steps5:04
4:23
6 questions