def test_packs_regex(self, acceptable, non_acceptable, regex): for test_path in acceptable: assert checked_type_by_reg(test_path, compared_regexes=regex) for test_path in non_acceptable: assert not checked_type_by_reg(test_path, compared_regexes=regex)
def test_get_matching_regex(self, string_to_match, regexes, answer): assert checked_type_by_reg(string_to_match, regexes, True) == answer