From 2205117f92cdc5a59f28703f0f670764d399fdd4 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 30 Apr 2014 16:58:27 +0200 Subject: [PATCH] test for #397, something raises ModuleNotFound if we use Definition.type --- test/test_api/test_api_classes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_api/test_api_classes.py b/test/test_api/test_api_classes.py index 4ec87d0d..8ed7860e 100644 --- a/test/test_api/test_api_classes.py +++ b/test/test_api/test_api_classes.py @@ -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