void () { Map<String, PsiElement> marks = loadTest(); assertEquals(2, marks.size()); final PsiElement originalElement = marks.get("<the_doc>"); PsiElement docElement = originalElement.getParent(); // ident -> expr assertTrue(docElement instanceof PyStringLiteralExpression); String stringValue = ((PyStringLiteralExpression)docElement).getStringValue(); assertNotNull(stringValue); PsiElement referenceElement = marks.get("<the_ref>").getParent(); // ident -> expr final PyDocStringOwner docOwner = (PyDocStringOwner)((PyReferenceExpression)referenceElement).getReference().resolve(); assertNotNull(docOwner); assertEquals(docElement, docOwner.getDocStringExpression()); checkByHTML(myProvider.generateDoc(docOwner, originalElement)); }