def loadTestsFromTestClass(self, cls):
def wanted(attr, cls=cls, sel=self.selector):<EOL><INDENT>item = getattr(cls, attr, None)<EOL>if isfunction(item):<EOL><INDENT>item = unbound_method(cls, item)<EOL><DEDENT>elif not ismethod(item):<EOL><INDENT>return False<EOL><DEDENT>return sel.wantMethod(item)<EOL><DEDENT>cases = [self.makeTest(getattr(cls, case), cls)<EOL>for case in filter(wanted, dir(cls))]<EOL>for test in self.config.plugins.loadTestsFromTestClass(cls):<EOL><INDENT>cases.append(test)<EOL><DEDENT>return self.suiteClass(ContextList(cases, context=cls))<EOL>
Load tests from a test class that is *not* a unittest.TestCase
        subclass.

        In this case, we can't depend on the class's `__init__` taking method
        name arguments, so we have to compose a MethodTestCase for each
        method in the class that looks testlike.