void () { runPythonTest(new PyUnitTestProcessWithConsoleTestTask("testRunner/env/unit/failFast", "test_test.py") { @NotNull @Override protected PyUnitTestProcessRunner createProcessRunner() { return new PyUnitTestProcessRunner(toFullPath(getMyScriptName()), 1) { @Override protected void configurationCreatedAndWillLaunch(@NotNull final PyUnitTestConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); configuration.setAdditionalArguments("-f"); //FailFast } }; } @Override protected void checkTestResults(@NotNull final PyUnitTestProcessRunner runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, int exitCode) { assertEquals("Runner did not stop after first fail", 1, runner.getAllTestsCount()); assertEquals("Bad tree produced for failfast", """ Test tree: [root](-) .test_test(-) ..SomeTestCase(-) ...test_1_test(-) """, runner.getFormattedTestTree()); } }); }