Exemplo n.º 1
0
 def test_legitimate_sonnet(self):
     assert sonnet.sonnet_rhyming_score(
         map(lambda s: s.split(), self.VALID_SONNET.lower().splitlines(False))) == 1.0
Exemplo n.º 2
0
 def test_multi_line_rhyming(self):
     assert sonnet.sonnet_rhyming_score('ababcdcdefefgg') == 1.0
     assert sonnet.sonnet_rhyming_score('ababcdcdefefeg') == 6.0 / 7.0