1 from __future__
import absolute_import
, division
, unicode_literals
3 from cola
import compat
4 from cola
import spellcheck
9 def test_spellcheck_generator():
10 check
= spellcheck
.NorvigSpellCheck()
11 assert_spellcheck(check
)
14 def test_spellcheck_unicode():
15 path
= helper
.fixture('unicode.txt')
16 check
= spellcheck
.NorvigSpellCheck(cracklib
=path
)
17 assert_spellcheck(check
)
20 def assert_spellcheck(check
):
21 for word
in check
.read():
22 assert word
is not None
23 assert isinstance(word
, compat
.ustr
)