void () { runPythonTest( new PyProcessWithConsoleTestTask<PyTestTestProcessRunner>("/testRunner/env/pytest/monkeyPatch", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyTestTestProcessRunner createProcessRunner() { return new PyTestTestProcessRunner("test_test.py", 0); } @Override protected void checkTestResults(@NotNull PyTestTestProcessRunner runner, @NotNull String stdout, @NotNull String stderr, @NotNull String all, int exitCode) { assertEquals("Monkeypatch broke the test: " + stderr, 1, runner.getPassedTestsCount()); } }); }