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