'Skip paths that match any of the doctest_norecursedirs patterns.'

def pytest_ignore_collect(self, path, config):

    for pattern in config.getini(u'doctest_norecursedirs'):
        if path.check(fnmatch=pattern):
            self._ignore_paths.append(path)
            break
    return False
