remove all the deprecation warnings in jedi itself

This commit is contained in:
David Halter
2013-08-11 23:00:27 +04:30
parent 0ab4119447
commit e07625017d
7 changed files with 21 additions and 23 deletions

View File

@@ -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 = []

View File

@@ -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

View File

@@ -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():

View File

@@ -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):