void () { runPythonTest(new PyProcessWithConsoleTestTask<PyTestTestProcessRunner>("/testRunner/env/pytest/keywords", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyTestTestProcessRunner createProcessRunner() { return new PyTestTestProcessRunner("test_test.py", 0) { @Override protected void configurationCreatedAndWillLaunch(@NotNull final PyTestConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); configuration.setKeywords("not spam"); } }; } @Override protected void checkTestResults(@NotNull final PyTestTestProcessRunner runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, final int exitCode) { assertEquals(""" Test tree: [root](+) .test_test(+) ..test_eggs(+) """, runner.getFormattedTestTree()); assertEquals(0, exitCode); } }); }