I am running a couple of nosetests
with test cases in different modules (files) each containing different tests.
I want to define a function/method that is only called once during the execution with nosetest
.
I looked at the documentation (and e.g. here) and see there are methods like setup_module
etc. - but where and how to use them? Put them into my __init__.py
? Something else?
I tried to use the following:
class TestSuite(basicsuite.BasicSuite):
def setup_module(self):
print("MODULE")
...
but this printout is never done when I run the test with nosetest
. I also do not derive from unittest.TestCase
(which will result in errors).