void () { Map<String, PsiElement> marks = loadTest(); Assert.assertEquals(2, marks.size()); PsiElement elt = marks.get("<the_if>").getParent().getParent(); // if_keyword -> if_part -> if_stmt Assert.assertTrue(elt instanceof PyIfStatement); PyIfStatement if_stmt = (PyIfStatement)elt; PyIfPart if_part = if_stmt.getIfPart(); Assert.assertFalse(if_part.isElif()); PyExpression if_cond = if_part.getCondition(); Assert.assertEquals(marks.get("<the_cond>").getParent(), if_cond); }