mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-03 07:42:44 +08:00
remove all the deprecation warnings in jedi itself
This commit is contained in:
@@ -191,8 +191,7 @@ class IntegrationTestCase(object):
|
||||
def run_usages(self, compare_cb):
|
||||
result = self.script().usages()
|
||||
self.correct = self.correct.strip()
|
||||
compare = sorted((r.module_name, r.start_pos[0], r.start_pos[1])
|
||||
for r in result)
|
||||
compare = sorted((r.module_name, r.line, r.column) for r in result)
|
||||
wanted = []
|
||||
if not self.correct:
|
||||
positions = []
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
Test all things related to the ``jedi.api`` module.
|
||||
"""
|
||||
|
||||
import jedi
|
||||
from jedi import common
|
||||
from jedi import common, api
|
||||
|
||||
|
||||
def test_preload_modules():
|
||||
@@ -19,9 +18,9 @@ def test_preload_modules():
|
||||
with common.ignored(KeyError): # performance of tests -> no reload
|
||||
new['__builtin__'] = temp_cache['__builtin__']
|
||||
|
||||
jedi.preload_module('datetime')
|
||||
api.preload_module('datetime')
|
||||
check_loaded('datetime')
|
||||
jedi.preload_module('json', 'token')
|
||||
api.preload_module('json', 'token')
|
||||
check_loaded('datetime', 'json', 'token')
|
||||
|
||||
cache.parser_cache = temp_cache
|
||||
|
||||
@@ -39,7 +39,7 @@ def test_goto_following_on_imports():
|
||||
s = "import multiprocessing.dummy; multiprocessing.dummy"
|
||||
g = Script(s).goto_assignments()
|
||||
assert len(g) == 1
|
||||
assert g[0].start_pos != (0, 0)
|
||||
assert (g[0].line, g[0].column) != (0, 0)
|
||||
|
||||
|
||||
def test_follow_definition():
|
||||
|
||||
@@ -11,8 +11,8 @@ class TestInterpreterAPI(TestCase):
|
||||
def check_interpreter_complete(self, source, namespace, completions,
|
||||
**kwds):
|
||||
script = jedi.Interpreter(source, [namespace], **kwds)
|
||||
cs = script.complete()
|
||||
actual = [c.word for c in cs]
|
||||
cs = script.completions()
|
||||
actual = [c.name for c in cs]
|
||||
self.assertEqual(sorted(actual), sorted(completions))
|
||||
|
||||
def test_complete_raw_function(self):
|
||||
|
||||
Reference in New Issue
Block a user