コード例 #1
0
ファイル: test_files.py プロジェクト: elimarkov/coveragepy
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)
コード例 #2
0
ファイル: test_files.py プロジェクト: hugovk/coveragepy
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)