'Given a Python object, return whatever tests that are in it. Whatever
\'in\' might mean.
@param thing: A Python object. A module, method, class or package.
@param recurse: Whether or not to look in subpackages of packages.
Defaults to False.
@param parent: For compatibility with the Python 3 loader, does
nothing.
@param qualname: For compatibility with the Python 3 loader, does
nothing.
@return: A C{TestCase} or C{TestSuite}.'

def loadAnything(self, thing, recurse=False, parent=None, qualName=None):

    if isinstance(thing, types.ModuleType):
        if isPackage(thing):
            return self.loadPackage(thing, recurse)
        return self.loadModule(thing)
    elif isinstance(thing, types.ClassType):
        return self.loadClass(thing)
    elif isinstance(thing, type):
        return self.loadClass(thing)
    elif isinstance(thing, types.MethodType):
        return self.loadMethod(thing)
    raise TypeError(('No    loader    for    %r.    Unrecognized    type' % (thing,)))
