if w.messages:
    raise PyflakesError(path, w.messages)

def test():
    for root, dirs, files in os.walk(TOP):
        for name in files:
            if not name.endswith('.py'):
                continue
yield check, os.path.relpath(os.path.join(root, name), TOP)

def is_package(d):
    return os.path.exists(os.path.join(root, d, '__init__.py'))
dirs[:] = list(filter(is_package, dirs))
Is there a plugin for pylint and pyflakes for nose tests?