コード例 #1
0
 public void testEpydocParamTag() {
   final PyDocumentationSettings settings =
       PyDocumentationSettings.getInstance(myFixture.getModule());
   settings.setFormat(DocStringFormat.EPYTEXT);
   try {
     doTest();
   } finally {
     settings.setFormat(DocStringFormat.PLAIN);
   }
 }
コード例 #2
0
 public void testEpydocTagsMiddle() {
   final PyDocumentationSettings settings =
       PyDocumentationSettings.getInstance(myFixture.getModule());
   settings.setFormat(DocStringFormat.EPYTEXT);
   try {
     myFixture.configureByFile("completion/epydocTagsMiddle.py");
     myFixture.completeBasic();
     myFixture.checkResultByFile("completion/epydocTagsMiddle.after.py");
   } finally {
     settings.setFormat(DocStringFormat.PLAIN);
   }
 }
コード例 #3
0
 public void testEpydocTags() {
   final PyDocumentationSettings settings =
       PyDocumentationSettings.getInstance(myFixture.getModule());
   settings.setFormat(DocStringFormat.EPYTEXT);
   try {
     myFixture.configureByFile("completion/epydocTags.py");
     myFixture.completeBasic();
     final List<String> lookupElementStrings = myFixture.getLookupElementStrings();
     assertNotNull(lookupElementStrings);
     assertTrue(lookupElementStrings.contains("@param"));
   } finally {
     settings.setFormat(DocStringFormat.PLAIN);
   }
 }
コード例 #4
0
 public void testIdentifiersInPlainDocstring() {
   final PyDocumentationSettings settings =
       PyDocumentationSettings.getInstance(myFixture.getModule());
   settings.setFormat(DocStringFormat.PLAIN);
   myFixture.configureByFile("completion/identifiersInPlainDocstring.py");
   final LookupElement[] elements = myFixture.completeBasic();
   assertNotNull(elements);
   assertContainsElements(
       Lists.newArrayList(elements),
       LookupElementBuilder.create("bar")
           .withAutoCompletionPolicy(AutoCompletionPolicy.NEVER_AUTOCOMPLETE));
 }