示例#1
0
def test_closed():
    a_string = u"(hello( my good friend)))"
    assert pp.parentheticals(a_string) == -1
示例#2
0
def test_balanced_improper4():
    a_string = u"())(((((((((())))))))))("
    assert pp.parentheticals(a_string) == -2
示例#3
0
def test_balanced_improper3():
    a_string = u")helo (hello( my good friend)()()()()"
    assert pp.parentheticals(a_string) == -2
示例#4
0
def test_open():
    a_string = u"(hello( my good friend)"
    assert pp.parentheticals(a_string) == 1
示例#5
0
def test_balanced_proper():
    a_string = u"(hello( my good friend))"
    assert pp.parentheticals(a_string) == 0