boolean (final String text, final ElementPattern<PsiElement> ref) { myFixture.configureByText(PythonFileType.INSTANCE, text); PsiElement element = myFixture.getFile().findElementAt(text.length() - 1); return ref.accepts(element); }