Exemple #1
0
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'})
Exemple #2
0
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'})
Exemple #3
0
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'})
Exemple #4
0
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'})
Exemple #5
0
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'