mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Use project instead of sys_path parameter in tests
This commit is contained in:
@@ -129,10 +129,11 @@ def test_completion_docstring(Script, jedi_path):
|
||||
Jedi should follow imports in certain conditions
|
||||
"""
|
||||
def docstr(src, result):
|
||||
c = Script(src, sys_path=[jedi_path]).complete()[0]
|
||||
c = Script(src, project=project).complete()[0]
|
||||
assert c.docstring(raw=True, fast=False) == cleandoc(result)
|
||||
|
||||
c = Script('import jedi\njed', sys_path=[jedi_path]).complete()[0]
|
||||
project = jedi.Project('.', sys_path=[jedi_path])
|
||||
c = Script('import jedi\njed', project=project).complete()[0]
|
||||
assert c.docstring(fast=False) == cleandoc(jedi_doc)
|
||||
|
||||
docstr('import jedi\njedi.Scr', cleandoc(jedi.Script.__doc__))
|
||||
|
||||
Reference in New Issue
Block a user