1
0
forked from VimPlug/jedi

Implement goto_assignments(follow_imports=True). Fixes #382.

This commit is contained in:
Dave Halter
2016-08-03 18:05:08 +02:00
parent c1bef454f5
commit ebd080a0fd
4 changed files with 37 additions and 7 deletions

View File

@@ -118,7 +118,11 @@ class TestCase(object):
try:
with open(self.path) as f:
self.script = jedi.Script(f.read(), self.line, self.column, self.path)
self.objects = getattr(self.script, self.operation)()
kwargs = {}
if self.operation == 'goto_assignments':
kwargs['follow_imports'] = random.choice([False, True])
self.objects = getattr(self.script, self.operation)(**kwargs)
if print_result:
print("{path}: Line {line} column {column}".format(**self.__dict__))
self.show_location(self.line, self.column)