Ejemplo n.º 1
0
 def test_verse_eight_the_man_all_tattered_and_torn(self):
     self.assertEqual(
         recite(8, 8),
         [
             "This is the man all tattered and torn that kissed the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 2
0
 def test_verse_four_the_cat_that_killed(self):
     self.assertEqual(
         recite(4, 4),
         [
             "This is the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 3
0
 def test_verse_nine_the_priest_all_shaven_and_shorn(self):
     self.assertEqual(
         recite(9, 9),
         [
             "This is the priest all shaven and shorn that married the man all tattered and torn that kissed the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 4
0
 def test_verse_10_the_rooster_that_crowed_in_the_morn(self):
     self.assertEqual(
         recite(10, 10),
         [
             "This is the rooster that crowed in the morn that woke the priest all shaven and shorn that married the man all tattered and torn that kissed the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 5
0
 def test_verse_three_the_rat_that_ate(self):
     self.assertEqual(
         recite(3, 3),
         [
             "This is the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 6
0
 def test_verse_six_the_cow_with_the_crumpled_horn(self):
     self.assertEqual(
         recite(6, 6),
         [
             "This is the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 7
0
 def test_verse_five_the_dog_that_worried(self):
     self.assertEqual(
         recite(5, 5),
         [
             "This is the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 8
0
 def test_verse_three(self):
     expected = [
         "This is the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(3, 3), expected)
Ejemplo n.º 9
0
 def test_verse_seven_the_maiden_all_forlorn(self):
     self.assertEqual(
         recite(7, 7),
         [
             "This is the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 10
0
 def test_verse_12_the_horse_and_the_hound_and_the_horn(self):
     self.assertEqual(
         recite(12, 12),
         [
             "This is the horse and the hound and the horn that belonged to the farmer sowing his corn that kept the rooster that crowed in the morn that woke the priest all shaven and shorn that married the man all tattered and torn that kissed the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."
         ],
     )
Ejemplo n.º 11
0
 def test_verse_three(self):
     expected = [
         "This is the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(3, 3), expected)
Ejemplo n.º 12
0
 def test_verse_four(self):
     expected = [
         "This is the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(4, 4), expected)
Ejemplo n.º 13
0
 def test_verse_four(self):
     expected = [
         "This is the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(4, 4), expected)
Ejemplo n.º 14
0
 def test_verse_five(self):
     expected = [
         "This is the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(5, 5), expected)
Ejemplo n.º 15
0
 def test_verse_five(self):
     expected = [
         "This is the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(5, 5), expected)
Ejemplo n.º 16
0
 def test_verse_six(self):
     expected = [
         "This is the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(6, 6), expected)
Ejemplo n.º 17
0
 def test_verse_six(self):
     expected = [
         "This is the cow with the crumpled horn "
         "that tossed the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(6, 6), expected)
Ejemplo n.º 18
0
 def test_verse_seven(self):
     expected = [
         "This is the maiden all forlorn "
         "that milked the cow with the crumpled horn "
         "that tossed the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(7, 7), expected)
Ejemplo n.º 19
0
 def test_multiple_verses(self):
     self.assertEqual(
         recite(4, 8),
         [
             "This is the cat that killed the rat that ate the malt that lay in the house that Jack built.",
             "This is the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built.",
             "This is the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built.",
             "This is the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built.",
             "This is the man all tattered and torn that kissed the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built.",
         ],
     )
Ejemplo n.º 20
0
 def test_verse_seven(self):
     expected = [
         "This is the maiden all forlorn "
         "that milked the cow with the crumpled horn "
         "that tossed the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(7, 7), expected)
Ejemplo n.º 21
0
 def test_verse_eight(self):
     expected = [
         "This is the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(8, 8), expected)
Ejemplo n.º 22
0
 def test_verse_nine(self):
     expected = [
         "This is the priest all shaven and shorn "
         "that married the man all tattered and torn "
         "that kissed the maiden all forlorn "
         "that milked the cow with the crumpled horn "
         "that tossed the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(9, 9), expected)
Ejemplo n.º 23
0
 def test_verse_nine(self):
     expected = [
         "This is the priest all shaven and shorn "
         "that married the man all tattered and torn "
         "that kissed the maiden all forlorn "
         "that milked the cow with the crumpled horn "
         "that tossed the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(9, 9), expected)
Ejemplo n.º 24
0
 def test_verse_10(self):
     expected = [
         "This is the rooster that crowed in the morn",
         "that woke the priest all shaven and shorn",
         "that married the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(10, 10), expected)
Ejemplo n.º 25
0
 def test_verse_11(self):
     expected = [
         "This is the farmer sowing his corn "
         "that kept the rooster that crowed in the morn "
         "that woke the priest all shaven and shorn "
         "that married the man all tattered and torn "
         "that kissed the maiden all forlorn "
         "that milked the cow with the crumpled horn "
         "that tossed the dog "
         "that worried the cat "
         "that killed the rat "
         "that ate the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(11, 11), expected)
Ejemplo n.º 26
0
 def test_verse_one(self):
     expected = ["This is the house that Jack built."]
     self.assertEqual(recite(1, 1), expected)
Ejemplo n.º 27
0
 def test_verse_two(self):
     expected = [
         "This is the malt "
         "that lay in the house that Jack built."
     ]
     self.assertEqual(recite(2, 2), expected)
Ejemplo n.º 28
0
 def test_multiple_verses(self):
     expected = [recite(i, i)[0] for i in range(4, 9)]
     self.assertEqual(recite(4, 8), expected)
Ejemplo n.º 29
0
 def test_full_rhyme(self):
     expected = [recite(i, i)[0] for i in range(1, 13)]
     self.assertEqual(recite(1, 12), expected)
Ejemplo n.º 30
0
 def test_multiple_verses(self):
     expected = [recite(i, i)[0] for i in range(4, 9)]
     self.assertEqual(recite(4, 8), expected)
Ejemplo n.º 31
0
 def test_full_rhyme(self):
     expected = [recite(i, i)[0] for i in range(1, 13)]
     self.assertEqual(recite(1, 12), expected)
Ejemplo n.º 32
0
 def test_full_rhyme(self):
     expected = [
         "This is the house that Jack built.",
         "",
         "This is the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the priest all shaven and shorn",
         "that married the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the rooster that crowed in the morn",
         "that woke the priest all shaven and shorn",
         "that married the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the farmer sowing his corn",
         "that kept the rooster that crowed in the morn",
         "that woke the priest all shaven and shorn",
         "that married the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
         "",
         "This is the horse and the hound and the horn",
         "that belonged to the farmer sowing his corn",
         "that kept the rooster that crowed in the morn",
         "that woke the priest all shaven and shorn",
         "that married the man all tattered and torn",
         "that kissed the maiden all forlorn",
         "that milked the cow with the crumpled horn",
         "that tossed the dog",
         "that worried the cat",
         "that killed the rat",
         "that ate the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(1, 12), expected)
Ejemplo n.º 33
0
 def test_verse_two(self):
     expected = [
         "This is the malt",
         "that lay in the house that Jack built.",
     ]
     self.assertEqual(recite(2, 2), expected)
Ejemplo n.º 34
0
 def test_verse_one(self):
     expected = ["This is the house that Jack built."]
     self.assertEqual(recite(1, 1), expected)
Ejemplo n.º 35
0
 def test_verse_one_the_house_that_jack_built(self):
     self.assertEqual(recite(1, 1), ["This is the house that Jack built."])
Ejemplo n.º 36
0
 def test_verse_two_the_malt_that_lay(self):
     self.assertEqual(
         recite(2, 2), ["This is the malt that lay in the house that Jack built."]
     )