void () { runPythonTest(new PyProcessWithConsoleTestTask<PyTestTestProcessRunner>("/testRunner/env/pytest/parallel", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyTestTestProcessRunner createProcessRunner() { return new PyTestTestProcessRunner("test_parallel.py", 0) { @Override protected void configurationCreatedAndWillLaunch(@NotNull PyTestConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); configuration.setAdditionalArguments("-n 4"); } }; } @Override protected void checkTestResults(@NotNull PyTestTestProcessRunner runner, @NotNull String stdout, @NotNull String stderr, @NotNull String all, int exitCode) { assertThat("xdist not launched?", all, containsString("gw0")); assertEquals(""" Test tree: [root](+) .test_parallel(+) ..ExampleTestCase(+) ...test_example(+) """, runner.getFormattedTestTree()); } }); }