Esempio n. 1
0
    def testEn_02(self):
        self._copyDict('en_US')
        checker = SpellChecker(['en_US'], [self._pathToDicts])
        checker.skipWordsWithNumbers = True

        errors = checker.findErrors('  test   ')
        self.assertEqual(errors, [])
Esempio n. 2
0
 def testFindErrors_01(self):
     self._copyDict(u'ru_RU')
     checker = SpellChecker(self._application, [u'ru_RU'],
                            [self._pathToDicts])
     checker.skipWordsWithNumbers = True
     errors = checker.findErrors(u'')
     self.assertEqual(errors, [])
Esempio n. 3
0
    def testFindErrors_06(self):
        self._copyDict('ru_RU')
        checker = SpellChecker(['ru_RU'], [self._pathToDicts])
        checker.skipWordsWithNumbers = True

        errors = checker.findErrors('проверка ййй ээээ тест')
        self.assertEqual(errors, [('ййй', 9, 12), ('ээээ', 13, 17)])
Esempio n. 4
0
    def testFindErrors_05(self):
        self._copyDict('ru_RU')
        checker = SpellChecker(['ru_RU'], [self._pathToDicts])
        checker.skipWordsWithNumbers = False

        errors = checker.findErrors('ййй12')
        self.assertEqual(errors, [('ййй12', 0, 5)])
Esempio n. 5
0
    def testFindErrors_02(self):
        self._copyDict('ru_RU')
        checker = SpellChecker(['ru_RU'], [self._pathToDicts])
        checker.skipWordsWithNumbers = True

        errors = checker.findErrors('  проверка   ')
        self.assertEqual(errors, [])
Esempio n. 6
0
    def testFindErrors_06 (self):
        self._copyDict (u'ru_RU')
        checker = SpellChecker (self._application, [u'ru_RU'], [self._pathToDicts])
        checker.skipWordsWithNumbers = True

        errors = checker.findErrors (u'проверка ййй ээээ тест')
        self.assertEqual (errors, [(u'ййй', 9, 12), (u'ээээ', 13, 17)])
Esempio n. 7
0
    def testFindErrors_05 (self):
        self._copyDict (u'ru_RU')
        checker = SpellChecker (self._application, [u'ru_RU'], [self._pathToDicts])
        checker.skipWordsWithNumbers = False

        errors = checker.findErrors (u'ййй12')
        self.assertEqual (errors, [(u'ййй12', 0, 5)])
Esempio n. 8
0
    def testFindErrors_02 (self):
        self._copyDict (u'ru_RU')
        checker = SpellChecker (self._application, [u'ru_RU'], [self._pathToDicts])
        checker.skipWordsWithNumbers = True

        errors = checker.findErrors (u'  проверка   ')
        self.assertEqual (errors, [])
Esempio n. 9
0
    def testFindErrors_07(self):
        checker = SpellChecker(['ru_RU'], ['spell'])
        checker.skipWordsWithNumbers = True

        errors = checker.findErrors('  проверка   ')
        self.assertEqual(errors, [])