'Look for doctests in the given object, which will be a
function, method or class.'

def makeTest(self, obj, parent):

    optionflags = (doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS)
    doctests = self.finder.find(obj, module=getmodule(parent))
    if doctests:
        for test in doctests:
            if (len(test.examples) == 0):
                continue
            (yield DocTestCase(test, obj=obj, optionflags=optionflags, checker=self.checker))
