Пример #1
0
 def test_count_doge_words(self):
     self.assertEqual(count_doge_words(''), 0)
     self.assertEqual(count_doge_words('ala bala'), 0)
     self.assertEqual(count_doge_words('wowlolsosuchmuchvery'), 0)
     self.assertEqual(count_doge_words('lol'), 1)
     self.assertEqual(count_doge_words('wow wow wow'), 3)
     self.assertEqual(count_doge_words('wow lol so such much very'), 6)
     self.assertEqual(count_doge_words('wow ala bala such portokala'), 2)
Пример #2
0
 def test_with_glued_parasite_words(self):
     self.assertEqual(0, solution.count_doge_words('wowlolsosuchmuchvery'))
Пример #3
0
 def test_with_parasite_sentence(self):
     self.assertEqual(6, solution.count_doge_words('wow lol so such much very'))
Пример #4
0
 def test_with_empty_sentence(self):
     self.assertEqual(0, solution.count_doge_words(""))
Пример #5
0
 def test_sentence_with_parasite_word_as_part_of_normal_one(self):
     self.assertEqual(2, solution.count_doge_words("wow soon hard such difficult"))
Пример #6
0
 def test_sentence_without_slangs(self):
     self.assertEqual(0, solution.count_doge_words("The quick brown fox jumps over"))
Пример #7
0
 def test_with_simple_sentence(self):
     self.assertEqual(3, solution.count_doge_words("wow much hard such difficult"))
Пример #8
0
 def test_sentence_with_parasite_word_as_part_of_normal_one(self):
     self.assertEqual(
         2, solution.count_doge_words("wow soon hard such difficult"))
Пример #9
0
 def test_with_repeating_parasite_words(self):
     self.assertEqual(
         5,
         solution.count_doge_words('wow hard wow much such difficult much'))
Пример #10
0
 def test_with_more_space_between_parasites(self):
     self.assertEqual(
         6,
         solution.count_doge_words('wow  lol    so  such   much      very'))
Пример #11
0
 def test_with_glued_parasite_words(self):
     self.assertEqual(0, solution.count_doge_words('wowlolsosuchmuchvery'))
Пример #12
0
 def test_with_parasite_sentence(self):
     self.assertEqual(
         6, solution.count_doge_words('wow lol so such much very'))
Пример #13
0
 def test_with_empty_sentence(self):
     self.assertEqual(0, solution.count_doge_words(""))
Пример #14
0
 def test_with_repeating_parasite_words(self):
     self.assertEqual(5, solution.count_doge_words('wow hard wow much such difficult much'))
Пример #15
0
 def test_with_simple_sentence(self):
     self.assertEqual(3, count_doge_words("wow much hard such difficult"))
Пример #16
0
 def test_with_more_space_between_parasites(self):
     self.assertEqual(6, solution.count_doge_words('wow  lol    so  such   much      very'))
Пример #17
0
 def test_sentence_without_slangs(self):
     self.assertEqual(
         0, solution.count_doge_words("The quick brown fox jumps over"))