A good unit testing framework will allow not just the creation of tests for members of code elements, but will also provide mechanisms for executing code before any of the tests are run, as well as after all tests have executed, successfully or not. Python's unittest module handles that in the individual TestCase classes, which allow the class to implement the setUpClass and tearDownClass methods to handle the pre- and post-test setup and teardown, respectively.
That, then, means that it'd be possible to create a test class that could be imported, extended with module-specific properties, and added to a test module that could leverage all of the capabilities just shown to do the following: