예제 #1
0
def test_match_caching():
    assert matches("a,b", "a,b")
    assert matches("a,b", "a,*")
    assert not matches("a,b", "c,*")
    assert {'a,b;a,*': True,
            'a,b;c,*': False}
    assert matches("a,b", "a,*")
    assert not matches("a,b", "c,*")
    assert {'a,b;a,*': True,
            'a,b;c,*': False}
예제 #2
0
def test_match_optionals():
    assert matches("a,b", "a,b||")
    assert matches("a,b", "a,b|c|")
    assert matches("a,b,c", "a,b|c|")
    assert matches("a,b,c", "a,b|c,d|")
    assert matches("a,b", "a,b|c|*")
    assert not matches("a,b,d", "a,b|c|")
    assert matches("a,b,d", "a,b|c|*")
    assert matches("", "||")
    assert not matches("a", "||")
예제 #3
0
def test_match_optionals():
    assert matches("a,b", "a,b||")
    assert matches("a,b", "a,b|c|")
    assert matches("a,b,c", "a,b|c|")
    assert matches("a,b,c", "a,b|c,d|")
    assert matches("a,b", "a,b|c|*")
    assert not matches("a,b,d", "a,b|c|")
    assert matches("a,b,d", "a,b|c|*")
    assert matches("", "||")
    assert not matches("a", "||")
예제 #4
0
def test_match_optionals():
    assert matches("a,b", "a,b,[c]")
    assert matches("a,b,c", "a,b,[c]")
    assert matches("a,b", "a,b,[c],*")
    assert not matches("a,b,d", "a,b,[c]")
    assert matches("a,b,d", "a,b,[c],*")
예제 #5
0
def test_match_caching():
    assert matches("a,b", "a,b||")
    assert matches("a,b", "a||*")
    assert not matches("a,b", "c||*")
    assert matches("a,b", "a||*")
    assert not matches("a,b", "c||*")
예제 #6
0
def test_match_special_case():
    assert not matches("", "||*")
    assert not matches("a,b,c", "||*")
예제 #7
0
def test_match_caching():
    assert matches("a,b", "a,b||")
    assert matches("a,b", "a||*")
    assert not matches("a,b", "c||*")
    assert matches("a,b", "a||*")
    assert not matches("a,b", "c||*")
예제 #8
0
def test_match_special_case():
    assert not matches("", "||*")
    assert not matches("a,b,c", "||*")