Make imports stuff in API classes work. Now goto on imports follows even aliases.

This commit is contained in:
Dave Halter
2014-12-08 12:04:09 +01:00
parent 0ad6aeba6b
commit 8868b87d42
3 changed files with 12 additions and 16 deletions

View File

@@ -95,7 +95,7 @@ def test_function_call_signature_in_doc():
pass
f""").goto_definitions()
doc = defs[0].doc
assert "f(x, y = 1, z = 'a')" in str(doc)
assert "f(x, y=1, z='a')" in str(doc)
def test_class_call_signature():
@@ -308,4 +308,7 @@ class TestGotoAssignments(TestCase):
assert nms[1].name == 'foo'
assert nms[1].type == 'import'
assert [nms[1]] == nms[1].goto_assignments()
ass = nms[1].goto_assignments()
assert len(ass) == 1
assert ass[0].name == 'json'
assert ass[0].type == 'module'