mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-07 09:00:57 +08:00
Definition -> Name
This commit is contained in:
@@ -124,7 +124,7 @@ import pytest
|
||||
import jedi
|
||||
from jedi import debug
|
||||
from jedi._compatibility import unicode, is_py3
|
||||
from jedi.api.classes import Definition
|
||||
from jedi.api.classes import Name
|
||||
from jedi.api.completion import get_user_context
|
||||
from jedi import parser_utils
|
||||
from jedi.api.environment import get_default_environment, get_system_environment
|
||||
@@ -244,7 +244,7 @@ class IntegrationTestCase(BaseTestCase):
|
||||
raise Exception('Could not resolve %s on line %s'
|
||||
% (match.string, self.line_nr - 1))
|
||||
|
||||
should_be |= set(Definition(inference_state, r.name) for r in results)
|
||||
should_be |= set(Name(inference_state, r.name) for r in results)
|
||||
debug.dbg('Finished getting types', color='YELLOW')
|
||||
|
||||
# Because the objects have different ids, `repr`, then compare.
|
||||
|
||||
@@ -141,7 +141,7 @@ def test_infer_on_generator(Script):
|
||||
|
||||
def test_goto_definition_not_multiple(Script):
|
||||
"""
|
||||
There should be only one Definition result if it leads back to the same
|
||||
There should be only one result if it leads back to the same
|
||||
origin (e.g. instance method)
|
||||
"""
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ def test_builtins(Script):
|
||||
|
||||
def test_signature_is_definition(Script):
|
||||
"""
|
||||
Through inheritance, a signature is a sub class of Definition.
|
||||
Through inheritance, a signature is a sub class of Name.
|
||||
Check if the attributes match.
|
||||
"""
|
||||
s = """class Spam(): pass\nSpam"""
|
||||
|
||||
Reference in New Issue
Block a user