def test_cloed():
    text = "()))))"
    assert balanced(text) == -1
def test_order():
    text = ")()()()"
    assert balanced(text) == "You have started with a closed parentheses. Invalid."
def test_open():
    text = "(((()"
    assert balanced(text) == 1
def test_balanced():
    text = "()"
    assert balanced(text) == 0
Exemplo n.º 5
0
def test_open():
    text = "(((()"
    assert balanced(text) == 1
Exemplo n.º 6
0
def test_order():
    text = ")()()()"
    assert balanced(
        text) == "You have started with a closed parentheses. Invalid."
Exemplo n.º 7
0
def test_balanced():
    text = "()"
    assert balanced(text) == 0
Exemplo n.º 8
0
def test_cloed():
    text = "()))))"
    assert balanced(text) == -1