def test_multiple_verses(self): expected = ( "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.\n\n" + "On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.\n\n" + "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n\n" ) self.assertEqual(expected, verses(1, 3))
def test_multiple_verses(self): expected = ("On the first day of Christmas my true love gave to me, " "a Partridge in a Pear Tree.\n\n" "On the second day of Christmas my true love gave to me, " "two Turtle Doves, " "and a Partridge in a Pear Tree.\n\n" "On the third day of Christmas my true love gave to me, " "three French Hens, " "two Turtle Doves, " "and a Partridge in a Pear Tree.\n\n") self.assertEqual(expected, verses(1, 3))
def test_the_whole_song(self): self.assertEqual(verses(1, 12), sing())