Exemplo n.º 1
0
 def test_lots_of_punctuation(self):
     sentence = (
         "this is the test string! will it work? let's find out. it should work! or should it? oh yes. indeed."
     )
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(
         s, "This is the test string! Will it work? Let's find out. It should work! Or should it? Oh yes. Indeed."
     )
Exemplo n.º 2
0
 def test_tricky_period_sentence(self):
     sentence = "mikey went to St. Louis."
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(s, "Mikey went to St. Louis.")
Exemplo n.º 3
0
 def test_truncate_extra_spaces(self):
     sentence = "    let's skateboard in the Dojo with Mikey.     "
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(s, "Let's skateboard in the Dojo with Mikey.")
Exemplo n.º 4
0
 def test_multiple_proper_noun_sentences(self):
     sentence = "let's skateboard in the Dojo with Mikey. we'll flip out " "Donny!"
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(s, ("Let's skateboard in the Dojo with Mikey. We'll " "flip out Donny!"))
Exemplo n.º 5
0
 def test_proper_noun_sentence(self):
     sentence = "let's skateboard in the Dojo with Mikey."
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(s, "Let's skateboard in the Dojo with Mikey.")
Exemplo n.º 6
0
 def test_sentences(self):
     sentence = "booyakasha!"
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(s, "Booyakasha!")