void (@NotNull VirtualFile mainFile, @NotNull String expression, int lineNumber) { PsiElement element = PyDebuggerEditorsProvider.getContextElement(myFixture.getProject(), XSourcePositionImpl.create(mainFile, lineNumber)); final PyExpressionCodeFragmentImpl fragment = new PyExpressionCodeFragmentImpl(myFixture.getProject(), "fragment.py", expression, true); fragment.setContext(element); myFixture.configureFromExistingVirtualFile(fragment.getVirtualFile()); myFixture.enableInspections(getInspectionClass()); myFixture.checkHighlighting(isWarning(), isInfo(), isWeakWarning()); }