Python Testing
Treehouse
Course Summary
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!
-
+
Course Description
About this Course 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! What you'll learn
- Doctests
- Unit tests
- Test cases
- coverage.py
About the Teacher
Besides teaching Python at Treehouse, Kenneth Love is a husband & father. He created a few popular Python libraries, worked at most levels of the web stack, & was the Creative Director of a newspaper. He likes board games, whiskey, activism, & dry humor.
-
+
Course Syllabus
First Steps With Testing
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. 5 steps- What Is Testing? 1:54
- Writing and Running Doctests 12:11
- Create a Doctest 1 objective
- Your First unittest Test Case 5:41
- Simple Unit Test 2 objectives
Be Assertive
Now that we know how to start a TestCase, let's look at some of the assertions that Python provides us with. 6 stepsCovering Your Bases
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. 3 steps