You can write your customization function and apply it using the with_setup decorator:
from nose.tools import with_setup def my_setup(): ... @with_setup(my_setup) def test_one(): ... @with_setup(my_setup) def test_two(): ...
If you want to use the same setting for several test cases, you can use a similar method. First you create a setup function, then apply it to all test cameras using the decorator:
def my_setup(self):
Or else, you can simply assign your setting:
class MyTestCaseOne(unittest.TestCase): setup = my_setup
source share