mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
reduced support for None paths in path search, because the path should be set normally. -> fixes #75
This commit is contained in:
@@ -275,6 +275,9 @@ def sys_path_with_modifications(module):
|
|||||||
debug.dbg('sys path added: %s' % res)
|
debug.dbg('sys path added: %s' % res)
|
||||||
return sys_path
|
return sys_path
|
||||||
|
|
||||||
|
if module.path is None:
|
||||||
|
return [] # support for modules without a path is intentionally bad.
|
||||||
|
|
||||||
curdir = os.path.abspath(os.curdir)
|
curdir = os.path.abspath(os.curdir)
|
||||||
try:
|
try:
|
||||||
os.chdir(os.path.dirname(module.path))
|
os.chdir(os.path.dirname(module.path))
|
||||||
|
|||||||
@@ -271,11 +271,15 @@ class TestRegression(Base):
|
|||||||
assert [d.doc for d in defs]
|
assert [d.doc for d in defs]
|
||||||
|
|
||||||
def test_goto_following_on_imports(self):
|
def test_goto_following_on_imports(self):
|
||||||
g = self.goto("import multiprocessing.dummy; multiprocessing.dummy")
|
|
||||||
assert len(g) == 1
|
|
||||||
if not is_py25:
|
if not is_py25:
|
||||||
|
g = self.goto("import multiprocessing.dummy; multiprocessing.dummy")
|
||||||
|
assert len(g) == 1
|
||||||
assert g[0].start_pos != (0, 0)
|
assert g[0].start_pos != (0, 0)
|
||||||
|
|
||||||
|
script = api.Script("import json", 1, len("import js"), None)
|
||||||
|
completions = script.complete()
|
||||||
|
completions
|
||||||
|
|
||||||
|
|
||||||
class TestFeature(Base):
|
class TestFeature(Base):
|
||||||
def test_full_name(self):
|
def test_full_name(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user