forked from VimPlug/jedi
Merge branch 'feature_827_fuzzy_search' of https://github.com/jmfrank63/jedi
This commit is contained in:
@@ -271,3 +271,15 @@ def test_file_path_completions(Script, file, code, column, expected):
|
||||
assert len(comps) > 100 # This is basically global completions.
|
||||
else:
|
||||
assert [c.complete for c in comps] == expected
|
||||
|
||||
from jedi.api.helpers import start_match, fuzzy_match
|
||||
|
||||
def test_start_match():
|
||||
assert start_match('Condition', 'C')
|
||||
|
||||
def test_fuzzy_match():
|
||||
assert fuzzy_match('Condition', 'i')
|
||||
assert not fuzzy_match('Condition', 'p')
|
||||
assert fuzzy_match('Condition', 'ii')
|
||||
assert not fuzzy_match('Condition', 'Ciito')
|
||||
assert fuzzy_match('Condition', 'Cdiio')
|
||||
|
||||
Reference in New Issue
Block a user