mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
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()
|
||||
assert parent.name == 'str'
|
||||
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