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." )
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.")
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.")
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!"))
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.")
def test_sentences(self): sentence = "booyakasha!" s = Translate.capitalize(self.translate, sentence) self.assertEqual(s, "Booyakasha!")