@staticmethod
    def get_test_class(method):
        """
        return the TestCase class associated with method

        method can either be a test_* method, or setUpClass

        """
        try:
            # setUpClass
            return method.im_self
        except __HOLE__:
            # test_* method
            return method.__class__
dataset/ETHPy150Open dimagi/commcare-hq/testrunner.py/TimingTestSuite.get_test_class