themes: use the core module for io
[git-cola.git] / test / spellcheck_test.py
blob5a7d47b0effe0903a231c7272196efdfa80a1079
1 from __future__ import absolute_import, division, print_function, unicode_literals
3 from cola import compat
4 from cola import spellcheck
6 from . import helper
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)