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
Example #5
0
def test_open():
    text = "(((()"
    assert balanced(text) == 1
Example #6
0
def test_order():
    text = ")()()()"
    assert balanced(
        text) == "You have started with a closed parentheses. Invalid."
Example #7
0
def test_balanced():
    text = "()"
    assert balanced(text) == 0
Example #8
0
def test_cloed():
    text = "()))))"
    assert balanced(text) == -1