'You don\'t ever actually want to do this, so it\'s not in the public
API, but sometimes we want to compare the result of an iterative call
with a lookup call and make sure they\'re the same for test purposes.'

def findByIteration(self, modname, where=modules, importPackages=False):

    for modinfo in where.walkModules(importPackages=importPackages):
        if (modinfo.name == modname):
            return modinfo
    self.fail(('Unable    to    find    module    %r    through    iteration.' % (modname,)))
