Fix an issue where compiled object api types raised an error.

This commit is contained in:
Dave Halter
2016-12-21 00:23:50 +01:00
parent 90b76ee3ec
commit 464968aed7
3 changed files with 16 additions and 11 deletions

View File

@@ -238,9 +238,13 @@ class TestParent(TestCase):
def test_type():
"""
Github issue #397, type should never raise an error.
"""
for c in Script('a = [str()]; a[0].').completions():
if c.name == '__class__':
assert c.type == 'class'
else:
assert c.type in ('function', 'instance')
# Github issue #397, type should never raise an error.
for c in Script('import os; os.path.').completions():
assert c.type