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