- Course
- Core Tech
Unit Testing with Python 3
Unit testing is a great way to foster quality and enhance collaboration with other developers. Learn to write unit tests in good style using popular frameworks like unittest and pytest.
What you'll learn
Once you’ve learned the basics of the Python language and started building programs, you will soon realize a need for some automated tests to make sure everything you’ve built keeps on working as you (and other developers) extend and improve it. In this course, Unit Testing with Python, you will learn foundational knowledge in unit testing. First, you will discover how to write and run tests using the ‘unittest’ framework, and some theory about how to design good test cases. Next, you will explore other popular testing frameworks in Python - pytest and doctest. Finally, you will examine how to use test doubles effectively, and techniques for parameterized testing and measuring test coverage. When you’re finished with this course, you will have the skills and knowledge of writing unit tests needed to be confident adding tests for the code you write, and sharing those tests with other developers.
Table of contents
- Version Check | 15s
- What Is a Unit Test? | 2m 47s
- First Example Unit Test | 3m 52s
- Explanation of 'Test Case' and 'Test Runner' | 3m 56s
- Exception Checking with assertRaises & Explaination of 'Test Suite' | 1m 44s
- Skipping a Test Case & Explanation of 'Test Fixture' | 4m 35s
- Vocabulary Summary | 58s
- Example of Poor Unit Test Design | 4m 37s
- Better Design with Arrange-Act-Assert | 2m 45s
- Detailed Design of Arrange-Act-Assert Test Parts | 3m 12s
- Module Summary | 53s
About the author
Emily is an experienced software developer specializing in Test Driven Development, agile methods, and automated testing in general. She is a well known speaker, coding dojo facilitator, blogger, and author of "The Coding Dojo Handbook".
More Courses by Emily