Example #1
0
def test_fnmatches_to_regex(patterns, case_insensitive, partial, matches,
                            nomatches):
    regex = fnmatches_to_regex(patterns,
                               case_insensitive=case_insensitive,
                               partial=partial)
    for s in matches:
        assert regex.match(s)
    for s in nomatches:
        assert not regex.match(s)
Example #2
0
def test_fnmatches_to_regex(patterns, case_insensitive, partial, matches, nomatches):
    regex = fnmatches_to_regex(patterns, case_insensitive=case_insensitive, partial=partial)
    for s in matches:
        assert regex.match(s)
    for s in nomatches:
        assert not regex.match(s)