def test_codespell(): with tmpdict(codespell_dict) as path: d = M.Dictionary(path) t = functools.partial(_test_dict, d=d) t({'abandonned', 'Abandonned', 'ABANDONNED'}, {'abandoned'}) t({'clas', 'Clas', 'CLAS'}, {'class'}) t({'intented', 'Intented', 'INTENTED'}, {'intended', 'indented'})
def test_lintian_case(): with tmpdict(lintian_case_dict) as path: d = M.Dictionary(path) t = functools.partial(_test_dict, d=d) t({'american'}, {'American', 'AMERICAN'}) t({'Debian-Edu'}, {'Debian Edu', 'debian-edu', 'DEBIAN-EDU'}) t({'SLang'}, {'S-Lang', 'slang', 'SLANG'})
def test_lintian(): with tmpdict(lintian_dict) as path: d = M.Dictionary(path) t = functools.partial(_test_dict, d=d) t({'abandonned', 'Abandonned', 'ABANDONNED'}, {'abandoned'}) t({'portugese', 'Portugese', 'PORTUGESE'}, {'Portuguese'}) t({'upto', 'Upto', 'UPTO'}, {'up to'})
def test_plain(): with tmpdict(plain_dict) as path: d = M.Dictionary(path) t = functools.partial(_test_dict, d=d) t({'abandonned', 'Abandonned', 'ABANDONNED'}, {'abandoned'}) t({'Portugese'}, {'portugese', 'PORTUGESE'})
def test_kde(): with tmpdict(kde_dict) as path: d = M.Dictionary(path) t = functools.partial(_test_dict, d=d) t({'aasumes'}, {'assumes'}) # FIXME? 'assumes' t({'Addtional'}, {'Additional'}) # FIXME? 'addtional'