forked from VimPlug/jedi
test for #397, something raises ModuleNotFound if we use Definition.type
This commit is contained in:
@@ -180,3 +180,11 @@ class TestParent(TestCase):
|
|||||||
parent = Script('str.join').completions()[0].parent()
|
parent = Script('str.join').completions()[0].parent()
|
||||||
assert parent.name == 'str'
|
assert parent.name == 'str'
|
||||||
assert parent.type == 'class'
|
assert parent.type == 'class'
|
||||||
|
|
||||||
|
|
||||||
|
def test_type():
|
||||||
|
"""
|
||||||
|
Github issue #397, type should never raise an error.
|
||||||
|
"""
|
||||||
|
for c in Script('import os; os.path.').completions():
|
||||||
|
assert c.type
|
||||||
|
|||||||
Reference in New Issue
Block a user