コード例 #1
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_removes_trailing_whitespace(self):
     self.assertEqual(unify_case("test    "), "Test")
コード例 #2
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_removes_extra_whitespace_between_words(self):
     self.assertEqual(unify_case("test    case"), "Test Case")
コード例 #3
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_converts_dots_into_spaces(self):
     self.assertEqual(unify_case("test.case"), "Test Case")
コード例 #4
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_does_capitalize_special_cases_at_begin_of_string(self):
     for word in self.non_capital_words:
         self.assertEqual(unify_case(word), word.title())
コード例 #5
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_does_not_capitalize_special_cases_in_middle_of_string(self):
     for case, result in self.non_capital_words_cases:
         self.assertEqual(unify_case(case), result)
コード例 #6
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_only_first_letter_of_each_word_capitalized(self):
     self.assertEqual(unify_case("COMPLETE THIS TEST"), "Complete This Test")
コード例 #7
0
ファイル: tests.py プロジェクト: XeryusTC/filesort
 def test_does_capitalize_first_letter_of_each_word(self):
     self.assertEqual(unify_case("complete this test"), "Complete This Test")