Utils Usage

The misc module

find_test_caller()[source]

Find the caller class and test name.

Because we know that the interesting things that call us are test_* methods, and various kinds of setUp / tearDown, we can look through the call stack to find appropriate methods, and the class we were in when those were called.

singleton(cls)[source]

Simple wrapper for classes that should only have a single instance.