void (final @NotNull String from, final @NotNull String name, final @NotNull String file) { final String testName = getTestName(true); myFixture.copyDirectoryToProject(testName, ""); myFixture.configureByFile(file + ".py"); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> { AddImportHelper.addOrUpdateFromImportStatement(myFixture.getFile(), from, name, null, PROJECT, null); }); myFixture.checkResultByFile(testName + "/" + file + ".after.py"); }