Пример #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'})
Пример #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'})
Пример #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'})
Пример #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'})
Пример #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'