'checks if the given name matches the prefix or glob-pattern defined
in ini configuration.'

def _matches_prefix_or_glob_option(self, option_name, name):

    for option in self.config.getini(option_name):
        if name.startswith(option):
            return True
        elif ((('*' in option) or ('?' in option) or ('[' in option)) and fnmatch.fnmatch(name, option)):
            return True
    return False
