1 Answer
1

I don't know if this will work for pyunit but in Robot Framework, you can access singletons which represent the test suite and test case during the run.
May be the unittest runner you are using provides the same functionality instead of having to inspect the stack.