void (@NotNull final Consumer<Pair<String, CodeInsightTestFixture>> test) { final String subfolder = "sanity"; runPythonTest(new PyExecutionFixtureTestTask(subfolder) { @Override public void runTestOn(@NotNull String sdkHome, @Nullable Sdk existingSdk) { ApplicationManager.getApplication().invokeAndWait(() -> { final Pair<String, CodeInsightTestFixture> pathAndFixture = Pair.create(new File(myFixture.getTestDataPath(), subfolder).getPath(), myFixture); test.accept(pathAndFixture); }); } }); }