I've got some expensive setup in my test project that all tests need to do. Right now it is being done per test class, which is time consuming. I'm looking for a solution that is exactly like NUnit's OneTimeSetUp() method, which runs a method at the start of a test run. There is also a OneTimeTearDown() which would be necessary too.
I've looked into unittest's setUpModule(), but I'm not sure if it is what I'm looking for because it does not work for sub modules.
Ideally with a folder structure like:
- outer_one/
----test_base.py
----inner_one/
--------inner_test_one.py
----inner_two/
--------inner_test_two.py
Then the order of execution would be:
1. test_base().setUpRun()
2. inner_test_one().executeTests()
3. inner_test_two().executeTests()
4. test_base().tearDownRun()