Esempio n. 1
0
def test_suggest():
    suggested = suggest('abc', ['abc', 'abcdef'])
    expected = [('abc', 1.0), ('abcdef', 0.5)]
    assert list(suggested) == expected
Esempio n. 2
0
def test_suggest_finder():
    s = suggest('abc', {'abc': ['abc']}, finder=dict)
    e = [('abc', 1.0)]
    assert list(s) == e