2 from __future__
import absolute_import
, division
, unicode_literals
5 from cola
import compat
6 from cola
import spellcheck
11 class TestCase(unittest
.TestCase
):
13 def test_spellcheck_generator(self
):
14 check
= spellcheck
.NorvigSpellCheck()
15 self
.assert_spellcheck(check
)
17 def test_spellcheck_unicode(self
):
18 path
= helper
.fixture('unicode.txt')
19 check
= spellcheck
.NorvigSpellCheck(cracklib
=path
)
20 self
.assert_spellcheck(check
)
22 def assert_spellcheck(self
, check
):
23 for word
in check
.read():
24 self
.assertTrue(word
is not None)
25 self
.assertTrue(isinstance(word
, compat
.ustr
))
28 if __name__
== '__main__':