1
0
forked from VimPlug/jedi

Fix deprecations in tests

This commit is contained in:
Dave Halter
2020-03-21 02:42:00 +01:00
parent 5f6a25fb58
commit 5b54ac835d
5 changed files with 9 additions and 5 deletions

View File

@@ -450,7 +450,7 @@ def test_completion_cache(Script, module_injector):
@pytest.mark.parametrize('module', ['typing', 'os'])
def test_module_completions(Script, module):
for c in Script('import {module}; {module}.'.format(module=module)).completions():
for c in Script('import {module}; {module}.'.format(module=module)).complete():
# Just make sure that there are no errors
c.type
c.docstring()

View File

@@ -87,7 +87,7 @@ def test_version_info(Script):
sys.version_info"""))
c, = s.completions()
c, = s.complete()
assert c.docstring() == 'sys.version_info\n\nVersion information as a named tuple.'

View File

@@ -678,5 +678,5 @@ def bar():
def test_string_annotation(annotations, result, code):
x = lambda foo: 1
x.__annotations__ = annotations
defs = jedi.Interpreter(code or 'x()', [locals()]).goto_definitions()
defs = jedi.Interpreter(code or 'x()', [locals()]).infer()
assert [d.name for d in defs] == result