Example #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}
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", "||")
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", "||")
Example #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],*")
Example #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||*")
Example #6
0
def test_match_special_case():
    assert not matches("", "||*")
    assert not matches("a,b,c", "||*")
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||*")
def test_match_special_case():
    assert not matches("", "||*")
    assert not matches("a,b,c", "||*")