widgets: flake8 and pylint fixes
[git-cola.git] / test / spellcheck_test.py
blob0281b86543cff858c587f4cf843232820409c9cb
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(words=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)