コード例 #1
0
def test_cloed():
    text = "()))))"
    assert balanced(text) == -1
コード例 #2
0
def test_order():
    text = ")()()()"
    assert balanced(text) == "You have started with a closed parentheses. Invalid."
コード例 #3
0
def test_open():
    text = "(((()"
    assert balanced(text) == 1
コード例 #4
0
def test_balanced():
    text = "()"
    assert balanced(text) == 0
コード例 #5
0
def test_open():
    text = "(((()"
    assert balanced(text) == 1
コード例 #6
0
def test_order():
    text = ")()()()"
    assert balanced(
        text) == "You have started with a closed parentheses. Invalid."
コード例 #7
0
def test_balanced():
    text = "()"
    assert balanced(text) == 0
コード例 #8
0
def test_cloed():
    text = "()))))"
    assert balanced(text) == -1