mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-09 05:22:19 +08:00
Fix a goto case with nested pyi files
This commit is contained in:
@@ -14,3 +14,10 @@ def test_sqlite3_conversion(Script):
|
||||
d, = script1.goto_definitions(only_stubs=True)
|
||||
assert d.is_stub()
|
||||
assert d.full_name == 'sqlite3.dbapi2.Connection'
|
||||
|
||||
script2 = Script(path=d.module_path, line=d.line, column=d.column)
|
||||
d, = script2.goto_definitions()
|
||||
assert not d.is_stub()
|
||||
assert d.full_name == 'sqlite3.Connection'
|
||||
v, = d._name.infer()
|
||||
assert v.is_compiled()
|
||||
|
||||
@@ -28,12 +28,12 @@ from test.helpers import root_dir
|
||||
{'goto_has_python': True}],
|
||||
|
||||
['from keyword import kwlist; kwlist', 'typing.Sequence', True, True,
|
||||
{'full_name': 'keyword.kwlist'}],
|
||||
{'goto_full_name': 'keyword.kwlist'}],
|
||||
['from keyword import kwlist', 'typing.Sequence', True, True,
|
||||
{'full_name': 'keyword.kwlist'}],
|
||||
{'goto_full_name': 'keyword.kwlist'}],
|
||||
|
||||
['from socket import AF_INET', 'socket.AddressFamily', True, False,
|
||||
{'full_name': 'socket.AF_INET'}],
|
||||
{'goto_full_name': 'socket.AF_INET'}],
|
||||
['from socket import socket', 'socket.socket', True, True, {}],
|
||||
|
||||
['import with_stub', 'with_stub', True, True, {}],
|
||||
|
||||
Reference in New Issue
Block a user