Testing in Python 3
This course will teach you to write and use unit tests in Python using popular tools and frameworks like unittest and pytest.
What you'll learn
Developers want to be sure the code they write is good quality and does the right thing. In this course, Testing in Python 3, you’ll learn to write unit tests in popular frameworks like unittest and pytest. First, you’ll explore the basic ideas and vocabulary of unit testing with the built-in package unittest and the popular tool pytest. Next, you’ll discover how to use test doubles to isolate your units. Finally, you’ll learn how to use more advanced testing techniques like approval testing and parameterized tests. When you’re finished with this course, you’ll have the skills and knowledge of writing the automated tests needed to ensure your code does what you think it does and has a reliable suite of regression tests to support future development.
Table of contents
- Module Introduction 1m
- Demo: Replacing an Assertion with Approvals 8m
- Using Approval Testing Appropriately 3m
- Demo: Code Coverage 5m
- Demo: Combination Approvals 6m
- Using Combination Approvals Appropriately 1m
- Demo: Mutation Testing and Branch Coverage 4m
- Using Coverage and Mutation Testing Appropriately 4m
- Demo: Pairwise Testing 3m
- Module Summary 1m