mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 14:29:40 +08:00
is_keyword test
This commit is contained in:
@@ -3,7 +3,13 @@ import textwrap
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from jedi import api
|
from jedi import api
|
||||||
|
import jedi
|
||||||
|
|
||||||
|
def test_is_keyword():
|
||||||
|
results = jedi.Script('import ', 1, 1, None).goto_definitions()
|
||||||
|
assert len(results) == 1 and results[0].is_keyword == True
|
||||||
|
results = jedi.Script('str', 1, 1, None).goto_definitions()
|
||||||
|
assert len(results) == 1 and results[0].is_keyword == False
|
||||||
|
|
||||||
def make_definitions():
|
def make_definitions():
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user