fixed test data
authorEkaterina Tuzova <Ekaterina.Tuzova@jetbrains.com>
Mon, 25 Nov 2013 16:06:29 +0000 (20:06 +0400)
committerEkaterina Tuzova <Ekaterina.Tuzova@jetbrains.com>
Mon, 25 Nov 2013 16:06:29 +0000 (20:06 +0400)
python/testData/completion/identifiersInPlainDocstring.after.py [deleted file]
python/testSrc/com/jetbrains/python/PythonCompletionTest.java

diff --git a/python/testData/completion/identifiersInPlainDocstring.after.py b/python/testData/completion/identifiersInPlainDocstring.after.py
deleted file mode 100644 (file)
index 440570b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-def foo(bar):
-    """ Variable bar """
\ No newline at end of file
index 4f93ccad148cc954a91d2e7259892b90ea774fac..da7888e80332a9fe21c31a2878e4496e3b06492e 100644 (file)
  */
 package com.jetbrains.python;
 
+import com.google.common.collect.Lists;
 import com.intellij.codeInsight.completion.impl.CamelHumpMatcher;
+import com.intellij.codeInsight.lookup.AutoCompletionPolicy;
 import com.intellij.codeInsight.lookup.Lookup;
 import com.intellij.codeInsight.lookup.LookupElement;
+import com.intellij.codeInsight.lookup.LookupElementBuilder;
 import com.jetbrains.python.documentation.DocStringFormat;
 import com.jetbrains.python.documentation.PyDocumentationSettings;
 import com.jetbrains.python.fixtures.PyTestCase;
@@ -387,8 +390,10 @@ public class PythonCompletionTest extends PyTestCase {
     final PyDocumentationSettings settings = PyDocumentationSettings.getInstance(myFixture.getModule());
     settings.setFormat(DocStringFormat.PLAIN);
     myFixture.configureByFile("completion/identifiersInPlainDocstring.py");
-    myFixture.completeBasic();
-    myFixture.checkResultByFile("completion/identifiersInPlainDocstring.after.py");
+    final LookupElement[] elements = myFixture.completeBasic();
+    assertNotNull(elements);
+    assertContainsElements(Lists.newArrayList(elements),
+                           LookupElementBuilder.create("bar").withAutoCompletionPolicy(AutoCompletionPolicy.NEVER_AUTOCOMPLETE));
   }
 
   public void testPep328Completion() {  // PY-3409