void () { runPythonTest(new PyProcessWithConsoleTestTask<PyTestTestProcessRunner>("/testRunner/env/pytest", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyTestTestProcessRunner createProcessRunner() { if (getLevelForSdk().isPy3K()) { return new PyTestTestProcessRunner("folder_no_init_py/test_test.py", 2); } else { return new PyTestTestProcessRunner(toFullPath("folder_no_init_py/test_test.py"), 2) { @Override protected void configurationCreatedAndWillLaunch(@NotNull PyTestConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); configuration.setWorkingDirectory(getWorkingFolderForScript()); } }; } } @Override protected void checkTestResults(@NotNull final PyTestTestProcessRunner runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, int exitCode) { assertEquals(runner.getFormattedTestTree(), 1, runner.getFailedTestsCount()); if (runner.getCurrentRerunStep() == 0) { assertEquals(runner.getFormattedTestTree(), 2, runner.getAllTestsCount()); assertEquals(runner.getFormattedTestTree(), 1, runner.getPassedTestsCount()); } else { assertEquals(runner.getFormattedTestTree(), 1, runner.getAllTestsCount()); assertEquals(runner.getFormattedTestTree(), 0, runner.getPassedTestsCount()); } } }); }