def test_one_more_syllable(self): ''' Tests that a couplet can be made if the lines are one syllable difference ''' poem = couplet.couplet('couplet_test1') poem = [t.text for t in poem.tweets] print poem self.assertTrue((poem[0] == 'Boy I like the bay' and poem[1] == 'We will go there today!') or (poem[1] == 'Boy I like the bay' and poem[0] == 'We will go there today!'))
def test_same_syllables(self): ''' Tests that a couplet can be made with two lines w/ same # syllables ''' corpus = [parse('Well gosh, I hate the bay'), parse('You must go there today!'), parse('some filler')] poem = couplet.couplet('couplet_test2') poem = [t.text for t in poem.tweets] print poem self.assertTrue((poem[0] == 'Well gosh, I hate the bay' and poem[1] == 'You must go there today!') or (poem[1] == 'Well gosh, I hate the bay' and poem[0] == 'You must go there today!'))
def test_same_syllables(self): ''' Tests that a couplet can be made with two lines w/ same # syllables ''' corpus = [ parse('Well gosh, I hate the bay'), parse('You must go there today!'), parse('some filler') ] poem = couplet.couplet('couplet_test2') poem = [t.text for t in poem.tweets] print poem self.assertTrue((poem[0] == 'Well gosh, I hate the bay' and poem[1] == 'You must go there today!') or (poem[1] == 'Well gosh, I hate the bay' and poem[0] == 'You must go there today!'))