void () { runPythonTest(new PyProcessWithConsoleTestTask<PyTestTestProcessRunner>("/testRunner/env/pytest/rerun", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyTestTestProcessRunner createProcessRunner() { return new PyTestTestProcessRunner("failed_test.py", 2) { @Override protected void configurationCreatedAndWillLaunch(@NotNull PyTestConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); configuration.setAdditionalArguments("--log-level=INFO -vv"); } }; } @Override protected void checkTestResults(@NotNull final PyTestTestProcessRunner runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, int exitCode) { assert runner.getFailedTestsCount() == 1 : "Test must fail"; assertThat("No -vv argument in command line", stdout, containsString("-vv")); } }); }