April 2014
Beginner to intermediate
634 pages
15h 22m
English
There are three levels of setup and teardown available for the unittest modules. Here are the three different kinds of testing scopes: method, class, and module.
TestCase class has had a proper setup and teardown. Often, we'll use the setUp() method to create the unit objects and any mock objects that are required. We don't want to do something costly such as creating whole databases, as these methods are used before and after each test method.TestCase class. These methods bracket the sequence ...