コード例 #1
0
ファイル: tests.py プロジェクト: keymholio/kraang_api
 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."
     )
コード例 #2
0
ファイル: tests.py プロジェクト: keymholio/kraang_api
 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.")
コード例 #3
0
ファイル: tests.py プロジェクト: keymholio/kraang_api
 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.")
コード例 #4
0
ファイル: tests.py プロジェクト: keymholio/kraang_api
 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!"))
コード例 #5
0
ファイル: tests.py プロジェクト: keymholio/kraang_api
 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.")
コード例 #6
0
ファイル: tests.py プロジェクト: keymholio/kraang_api
 def test_sentences(self):
     sentence = "booyakasha!"
     s = Translate.capitalize(self.translate, sentence)
     self.assertEqual(s, "Booyakasha!")