Ejemplo n.º 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}
Ejemplo n.º 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", "||")
Ejemplo n.º 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", "||")
Ejemplo n.º 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],*")
Ejemplo n.º 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||*")
Ejemplo n.º 6
0
def test_match_special_case():
    assert not matches("", "||*")
    assert not matches("a,b,c", "||*")
Ejemplo n.º 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||*")
Ejemplo n.º 8
0
def test_match_special_case():
    assert not matches("", "||*")
    assert not matches("a,b,c", "||*")