probably finished the load_module method migration

This commit is contained in:
Dave Halter
2014-01-05 01:37:43 +01:00
parent 29e661ea74
commit 4d7349411e
6 changed files with 55 additions and 34 deletions

View File

@@ -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'