void (@NotNull final String name, @Nullable final String qualifier) { myFixture.configureByFile(getTestName(true) + ".py"); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> { final PsiReference reference = PyResolveTestCase.findReferenceByMarker(myFixture.getFile()); if (qualifier != null) { AddImportHelper.addLocalFromImportStatement(reference.getElement(), qualifier, name, null); } else { AddImportHelper.addLocalImportStatement(reference.getElement(), name, null); } }); myFixture.checkResultByFile(getTestName(true) + ".after.py"); }