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