void () { runPythonTest(new PyProcessWithConsoleTestTask<PyTestTestProcessRunner>("/testRunner/env/pytest/rerun", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyTestTestProcessRunner createProcessRunner() { return new PyTestTestProcessRunner("test:test_subsystems.TestBar", 2); } @Override protected void checkTestResults(@NotNull final PyTestTestProcessRunner runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, int exitCode) { assertEquals("Wrong number of passed tests", 0, runner.getPassedTestsCount()); assertEquals("Wrong number of failed tests", 1, runner.getFailedTestsCount()); assertEquals("Wrong tests executed", """ Test tree: [root](-) .test_subsystems(-) ..TestBar(-) ...test_something(-) """, runner.getFormattedTestTree()); } }); }