mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-08 19:50:58 +08:00
probably finished the load_module method migration
This commit is contained in:
@@ -11,6 +11,7 @@ from .helpers import TestCase, cwd_at
|
||||
import jedi
|
||||
from jedi import Script
|
||||
from jedi import api
|
||||
from jedi import modules
|
||||
from jedi.parser import Parser
|
||||
|
||||
#jedi.set_debug_function()
|
||||
@@ -81,8 +82,7 @@ class TestRegression(TestCase):
|
||||
src1 = "def r(a): return a"
|
||||
# Other fictional modules in another place in the fs.
|
||||
src2 = 'from .. import setup; setup.r(1)'
|
||||
# .parser to load the module
|
||||
api.modules.Module(os.path.abspath(fname), src2).parser
|
||||
modules.load_module(os.path.abspath(fname), src2)
|
||||
result = Script(src1, path='../setup.py').goto_definitions()
|
||||
assert len(result) == 1
|
||||
assert result[0].description == 'class int'
|
||||
|
||||
Reference in New Issue
Block a user