diff --git a/python/testData/completion/localVar.after.py b/python/testData/completion/localVar.after.py new file mode 100644 index 000000000000..f0326d8134f0 --- /dev/null +++ b/python/testData/completion/localVar.after.py @@ -0,0 +1,2 @@ +method = {} +method \ No newline at end of file diff --git a/python/testData/completion/localVar.py b/python/testData/completion/localVar.py new file mode 100644 index 000000000000..de95ce82114a --- /dev/null +++ b/python/testData/completion/localVar.py @@ -0,0 +1,2 @@ +method = {} +meth \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PythonCompletionTest.java b/python/testSrc/com/jetbrains/python/PythonCompletionTest.java new file mode 100644 index 000000000000..742bb3c0aeda --- /dev/null +++ b/python/testSrc/com/jetbrains/python/PythonCompletionTest.java @@ -0,0 +1,27 @@ +/* + * User: anna + * Date: 06-Mar-2008 + */ +package com.jetbrains.python; + +import com.intellij.codeInsight.completion.CodeCompletionHandler; +import com.intellij.openapi.application.PathManager; +import com.intellij.testFramework.LightCodeInsightTestCase; + +public class PythonCompletionTest extends LightCodeInsightTestCase{ + + private void doTest() throws Exception { + final String testName = getTestName(false); + configureByFile(testName + ".py"); + new CodeCompletionHandler().invoke(getProject(), getEditor(), getFile()); + checkResultByFile(testName + ".after.py"); + } + + protected String getTestDataPath() { + return PathManager.getHomePath() + "/plugins/python/testData/completion/"; + } + + public void testLocalVar() throws Exception { + doTest(); + } +} \ No newline at end of file