mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-27 08:03:34 +08:00
Implement goto_assignments(follow_imports=True). Fixes #382.
This commit is contained in:
1 parent
c1bef454f5
commit
ebd080a0fd
4 files changed
+37
-7
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user