コード例 #1
0
 def test_empty_dice_roll(self):
     dice_roll = []
     story_text = "The quick brown fox jumps over the lazy dog"
     self.assertEqual(is_story_valid(story_text, dice_roll), True)
コード例 #2
0
 def test_case_sensitive(self):
     dice_roll = ["FOX", "dog", "bROwn"]
     story_text = "The quick BrOwN fox jumps over the lazy DOG"
     self.assertEqual(is_story_valid(story_text, dice_roll), True)
コード例 #3
0
 def test_punctuation(self):
     dice_roll = ["dog", "fox", "jumps"]
     story_text = "The quick brown fox! jumps, over. the lazy dog?"
     self.assertEqual(is_story_valid(story_text, dice_roll), True)
コード例 #4
0
 def test_partial_word_matching(self):
     dice_roll = ["bro"]
     story_text = "The quick brown fox jumps over the lazy dog"
     self.assertEqual(is_story_valid(story_text, dice_roll), False)
コード例 #5
0
 def test_multi_word_failure(self):
     dice_roll = ["fox", "cat"]
     story_text = "The quick brown fox jumps over the lazy dog"
     self.assertEqual(is_story_valid(story_text, dice_roll), False)
コード例 #6
0
 def test_multi_word_success(self):
     dice_roll = ["fox", "dog"]
     story_text = "The quick brown fox jumps over the lazy dog"
     self.assertEqual(is_story_valid(story_text, dice_roll), True)