April 2019
Intermediate to advanced
646 pages
16h 48m
English
nose supports the following three levels of fixtures:
For instance, to set a test fixture at the module and test level, use this code:
def setup():
# setup code, launched for the whole module
...
def teardown():
# teardown code, launched for the whole module
...
def set_ok():
# setup code used on demand using with_setup decorator
...
@with_setup(set_ok)
def test_ok():
print('my test')