test for #397, something raises ModuleNotFound if we use Definition.type

This commit is contained in:
Dave Halter
2014-04-30 16:58:27 +02:00
parent 5ed887c170
commit 2205117f92

View File

@@ -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