void (final String name, final ImportPriority priority) { final String testName = getTestName(true); myFixture.copyDirectoryToProject(testName, ""); myFixture.configureByFile("main.py"); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> { AddImportHelper.addImportStatement(myFixture.getFile(), name, null, priority, null); }); myFixture.checkResultByFile(testName + "/main.after.py"); }