mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Use complete instead of completions in test_api/
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
def test_keyword_doc(Script):
|
||||
r = list(Script("or", 1, 1).goto_definitions())
|
||||
r = list(Script("or").infer(1, 1))
|
||||
assert len(r) == 1
|
||||
assert len(r[0].doc) > 100
|
||||
|
||||
r = list(Script("asfdasfd", 1, 1).goto_definitions())
|
||||
r = list(Script("asfdasfd").infer(1, 1))
|
||||
assert len(r) == 0
|
||||
|
||||
k = Script("fro").completions()[0]
|
||||
@@ -13,17 +13,17 @@ def test_keyword_doc(Script):
|
||||
|
||||
|
||||
def test_blablabla(Script):
|
||||
defs = Script("import").goto_definitions()
|
||||
defs = Script("import").infer()
|
||||
assert len(defs) == 1 and [1 for d in defs if d.doc]
|
||||
# unrelated to #44
|
||||
|
||||
|
||||
def test_operator_doc(Script):
|
||||
r = list(Script("a == b", 1, 3).goto_definitions())
|
||||
r = list(Script("a == b").infer(1, 3))
|
||||
assert len(r) == 1
|
||||
assert len(r[0].doc) > 100
|
||||
|
||||
|
||||
def test_lambda(Script):
|
||||
defs = Script('lambda x: x', column=0).goto_definitions()
|
||||
defs = Script('lambda x: x').infer(column=0)
|
||||
assert [d.type for d in defs] == ['keyword']
|
||||
|
||||
Reference in New Issue
Block a user