def test_pwl(self):
"""Test checker loop with PWL."""
from enchant import DictWithPWL
d = DictWithPWL("en_US",None,None)
txt = "I am sme text to be cheked with personal list of cheked words"
chkr = SpellChecker(d,txt)
for n,err in enumerate(chkr):
if n == 0:
self.assertEqual(err.word,"sme")
if n == 1:
self.assertEqual(err.word,"cheked")
chkr.add()
self.assertEqual(n,1)
评论列表
文章目录