Exemple #1
0
def test_simple_paranthesis():
    assert validate("()")
Exemple #2
0
def test_empty_input():
    assert validate("")
Exemple #3
0
def test_performance():
    start = time.time()
    validate("(()" * 20)
    end = time.time()
    assert end - start < 1
Exemple #4
0
def test_foo_bar():
    assert validate("()[]")
    assert validate("{()}[[{}]]")
Exemple #5
0
def test_unbalanced():
    assert not validate("{{)(}}")
Exemple #6
0
def test_nested_parens():
    assert validate("([])")
Exemple #7
0
def test_double_xxxxx():
    assert not validate("())")
Exemple #8
0
def test_double_parenthesis():
    assert not validate("([)]")
Exemple #9
0
def test_simple_paranthesis():
    assert not validate(")(")
Exemple #10
0
def test_simple_negative():
    assert not validate("(")