June 2017
Beginner to intermediate
274 pages
6h 49m
English
The unittest module contains a framework for performing automated unit testing. Most of this functionality is based around the unittest.TestCase class, which we will inherit from to create our own tests.
In the following example, we see the basic features of TestCase in action and also test and assert methods:

Any method that we define using a class inherited from TestCase, and that has a name that starts with the word test, is assumed to be a unit test. In the preceding example, this means that the test_addition method is a unit test; however, if we had added another method to the class, called connect, the unittest ...
Read now
Unlock full access