Пример #1
0
 def testSplitWordsWithCamelCase(self):
     self.assertEqual(['one', 'Two', 'Three'],
                      misspellings.split_words('oneTwoThree'))
     self.assertEqual(['one', 'Two', 'Three', 'four'],
                      misspellings.split_words('oneTwoThree_four'))
     self.assertEqual(['one', 'Two', 'Three', 'four', 'five'],
                      misspellings.split_words('oneTwoThree_four five'))
Пример #2
0
 def test_split_words_with_underscores(self):
     self.assertEqual(['one', 'two', 'three'],
                      misspellings.split_words('one_two_three'))
     self.assertEqual(['one', 'two', 'three'],
                      misspellings.split_words('one__two__three'))
     self.assertEqual(['one', 'two', 'three', 'four'],
                      misspellings.split_words('one_two_three four'))
Пример #3
0
 def testSplitWordsWithCamelCase(self):
   self.assertEqual(['one', 'Two', 'Three'],
                    misspellings.split_words('oneTwoThree'))
   self.assertEqual(['one', 'Two', 'Three', 'four'],
                    misspellings.split_words('oneTwoThree_four'))
   self.assertEqual(['one', 'Two', 'Three', 'four', 'five'],
                    misspellings.split_words('oneTwoThree_four five'))
Пример #4
0
 def test_split_words_with_underscores(self):
     self.assertEqual(['one', 'two', 'three'],
                      misspellings.split_words('one_two_three'))
     self.assertEqual(['one', 'two', 'three'],
                      misspellings.split_words('one__two__three'))
     self.assertEqual(['one', 'two', 'three', 'four'],
                      misspellings.split_words('one_two_three four'))
Пример #5
0
 def test_split_words_with_camel_case(self):
     self.assertEqual(['one', 'Two', 'Three'],
                      misspellings.split_words('oneTwoThree'))
     self.assertEqual(['one', 'Two', 'Three', 'Four'],
                      misspellings.split_words('oneTwoThreeFour'))
     self.assertEqual(['one', 'Two', 'Three', 'four'],
                      misspellings.split_words('oneTwoThree_four'))
     self.assertEqual(['one', 'Two', 'Three', 'four', 'five'],
                      misspellings.split_words('oneTwoThree_four five'))
     self.assertEqual(['foo', 'Up', 'To', 'Bar'],
                      misspellings.split_words('fooUpToBar'))
Пример #6
0
 def test_split_words_with_camel_case(self):
     self.assertEqual(['one', 'Two', 'Three'],
                      misspellings.split_words('oneTwoThree'))
     self.assertEqual(['one', 'Two', 'Three', 'Four'],
                      misspellings.split_words('oneTwoThreeFour'))
     self.assertEqual(['one', 'Two', 'Three', 'four'],
                      misspellings.split_words('oneTwoThree_four'))
     self.assertEqual(['one', 'Two', 'Three', 'four', 'five'],
                      misspellings.split_words('oneTwoThree_four five'))
     self.assertEqual(['foo', 'Up', 'To', 'Bar'],
                      misspellings.split_words('fooUpToBar'))
Пример #7
0
 def test_split_words_with_punctuation(self):
     self.assertEqual(['one', 'two'], misspellings.split_words('one, two'))
     self.assertEqual(['a', 'sentence', ''],
                      misspellings.split_words('a sentence.'))
Пример #8
0
 def test_split_words(self):
     self.assertEqual(['one', 'two', 'three'],
                      misspellings.split_words('one two three'))
Пример #9
0
 def test_split_words_with_other_characters(self):
     self.assertEqual(['the', 'big', 'cat'],
                      misspellings.split_words('the%big$cat'))
Пример #10
0
 def test_split_words_with_numbers(self):
     self.assertEqual(['upper', 'lower'],
                      misspellings.split_words('upper2lower'))
Пример #11
0
 def test_split_words(self):
     self.assertEqual(['one', 'two', 'three'],
                      misspellings.split_words('one two three'))
Пример #12
0
 def test_split_words_with_other_characters(self):
     self.assertEqual(['the', 'big', 'cat'],
                      misspellings.split_words('the%big$cat'))
Пример #13
0
 def testSplitWordsWithOtherCharacters(self):
   self.assertEqual(['the', 'big', 'cat'],
                    misspellings.split_words('the%big$cat'))
Пример #14
0
 def testSplitWordsWithNumbers(self):
   self.assertEqual(['upper', 'lower'],
                    misspellings.split_words('upper2lower'))
Пример #15
0
 def testSplitWordsWithOtherCharacters(self):
     self.assertEqual(['the', 'big', 'cat'],
                      misspellings.split_words('the%big$cat'))
Пример #16
0
 def test_split_words_with_numbers(self):
     self.assertEqual(['upper', 'lower'],
                      misspellings.split_words('upper2lower'))
Пример #17
0
 def test_split_words_with_punctuation(self):
     self.assertEqual(['one', 'two'],
                      misspellings.split_words('one, two'))
     self.assertEqual(['a', 'sentence', ''],
                      misspellings.split_words('a sentence.'))
Пример #18
0
 def testSplitWordsWithNumbers(self):
     self.assertEqual(['upper', 'lower'],
                      misspellings.split_words('upper2lower'))