nose2 ships with various decorators that assist you to write your tests.
Setup & Teardown
A decorator that sets the
setup()method to be executed before the test.
It currently works only for function test cases.
setup (function) – The method to be executed before the test.