예제 #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")