1
0
forked from VimPlug/jedi

test_imports: use sys_path

This commit is contained in:
immerrr
2015-10-21 17:35:28 +03:00
parent da4dbe81a9
commit 90a08794ba

View File

@@ -46,11 +46,8 @@ def test_flask_ext(script, name):
"""flask.ext.foo is really imported from flaskext.foo or flask_foo.
"""
path = os.path.join(os.path.dirname(__file__), 'flask-site-packages')
sys.path.append(path)
try:
assert name in [c.name for c in jedi.Script(script).completions()]
finally:
sys.path.remove(path)
completions = jedi.Script(script, sys_path=[path]).completions()
assert name in [c.name for c in completions]
@cwd_at('test/test_evaluate/')