コード例 #1
0
def test_sonnetparse_1():
    sonnets = "No Leading Blank Lines|body1|body2".split("|")
    assert_equals((3, "No Leading Blank Lines", ["body1", "body2"]),
                  parseNextSonnet(0, sonnets))
コード例 #2
0
def test_last_sonnet():
    sonnets = ["some", "sonnet", "here"]
    assert_equals((3, "", []), parseNextSonnet(3, sonnets))
コード例 #3
0
def test_sonnet_NoBody():
    sonnets = ["This is just a title"]
    (i, title, txt) = parseNextSonnet(0, sonnets)
コード例 #4
0
def test_sonnet_BadIndex():
    sonnets = ["Fred oh no start wrong place!"]
    (i, title, txt) = parseNextSonnet(1000, sonnets)
コード例 #5
0
def test_sonnetparse_2():
    sonnets = [
        "", "  ", "Many Leading Blank Lines", "", "", "body1", "body2", "", ""
    ]
    assert_equals((7, "Many Leading Blank Lines", ["body1", "body2"]),
                  parseNextSonnet(0, sonnets))