Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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)
Beispiel #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."
         ],
     )
Beispiel #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."
         ],
     )
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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.",
         ],
     )
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #26
0
 def test_verse_one(self):
     expected = ["This is the house that Jack built."]
     self.assertEqual(recite(1, 1), expected)
Beispiel #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)
Beispiel #28
0
 def test_multiple_verses(self):
     expected = [recite(i, i)[0] for i in range(4, 9)]
     self.assertEqual(recite(4, 8), expected)
Beispiel #29
0
 def test_full_rhyme(self):
     expected = [recite(i, i)[0] for i in range(1, 13)]
     self.assertEqual(recite(1, 12), expected)
Beispiel #30
0
 def test_multiple_verses(self):
     expected = [recite(i, i)[0] for i in range(4, 9)]
     self.assertEqual(recite(4, 8), expected)
Beispiel #31
0
 def test_full_rhyme(self):
     expected = [recite(i, i)[0] for i in range(1, 13)]
     self.assertEqual(recite(1, 12), expected)
Beispiel #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)
Beispiel #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)
Beispiel #34
0
 def test_verse_one(self):
     expected = ["This is the house that Jack built."]
     self.assertEqual(recite(1, 1), expected)
Beispiel #35
0
 def test_verse_one_the_house_that_jack_built(self):
     self.assertEqual(recite(1, 1), ["This is the house that Jack built."])
Beispiel #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."]
     )