Unit Testing with Python

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.
Course info
Rating
(15)
Level
Intermediate
Updated
Jun 28, 2019
Duration
2h 50m
Table of contents
Course Overview
Unit Test Fundamentals
Unit Testing Why and When
Unit Testing with pytest
Testable Documentation with doctest
Using Test Doubles
Parameterized Tests & Test Coverage
Description
Course info
Rating
(15)
Level
Intermediate
Updated
Jun 28, 2019
Duration
2h 50m
Description

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.

About the author
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 from the author
Unit Testing with Python
Intermediate
2h 58m
Nov 1, 2013
Coding Dojo: Test Driven Development
Intermediate
2h 4m
Jun 25, 2013
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
(Music) Hello, everyone! My name is Emily Bache. Welcome to my course, Unit Testing with Python. I am a technical agile coach. That means I help teams of developers to improve the way they write code, particularly by writing better tests. This course builds on the Python Fundamentals course, going through how to write unit tests. That is, tests that verify your code works the way you think it should. Unit testing is a great way to foster quality and enhance collaboration with other developers. Some of the major topics that we will cover include popular unit test frameworks in Python, test case design principles, using mocks stubs, and fakes, and measuring test coverage. By the end of this course, you'll be able to write unit tests in good style and hopefully avoid the embarrassment of anyone else finding bugs in your code. Before beginning the course, you should be familiar with the fundamentals of writing Python, and how to install third-party Python modules using pip. I hope you'll join me on this journey to learn how to write unit tests with the Unit Testing in Python course at Pluralsight.