mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-26 07:11:08 +08:00
Move test_integration_keywrod to test_api/test_keyword
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
# todo probably remove test_integration_keyword
|
def test_keyword_doc(Script):
|
||||||
|
|
||||||
def test_keyword_doc():
|
|
||||||
r = list(Script("or", 1, 1).goto_definitions())
|
r = list(Script("or", 1, 1).goto_definitions())
|
||||||
assert len(r) == 1
|
assert len(r) == 1
|
||||||
assert len(r[0].doc) > 100
|
assert len(r[0].doc) > 100
|
||||||
@@ -14,17 +12,18 @@ def test_keyword_doc():
|
|||||||
assert k.doc.startswith(imp_start)
|
assert k.doc.startswith(imp_start)
|
||||||
|
|
||||||
|
|
||||||
def test_blablabla():
|
def test_blablabla(Script):
|
||||||
defs = Script("import").goto_definitions()
|
defs = Script("import").goto_definitions()
|
||||||
assert len(defs) == 1 and [1 for d in defs if d.doc]
|
assert len(defs) == 1 and [1 for d in defs if d.doc]
|
||||||
# unrelated to #44
|
# unrelated to #44
|
||||||
|
|
||||||
|
|
||||||
def test_operator_doc(self):
|
def test_operator_doc(Script):
|
||||||
r = list(Script("a == b", 1, 3).goto_definitions())
|
r = list(Script("a == b", 1, 3).goto_definitions())
|
||||||
assert len(r) == 1
|
assert len(r) == 1
|
||||||
assert len(r[0].doc) > 100
|
assert len(r[0].doc) > 100
|
||||||
|
|
||||||
def test_lambda():
|
|
||||||
|
def test_lambda(Script):
|
||||||
defs = Script('lambda x: x', column=0).goto_definitions()
|
defs = Script('lambda x: x', column=0).goto_definitions()
|
||||||
assert [d.type for d in defs] == ['keyword']
|
assert [d.type for d in defs] == ['keyword']
|
||||||
|
|||||||
Reference in New Issue
Block a user