void () { runPythonTest(new PyUnitTestProcessWithConsoleTestTask("testRunner/env/unit/testDiff", "test_test.py") { @Override protected void checkTestResults(@NotNull final PyUnitTestProcessRunner runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, int exitCode) { Assert.assertThat("No expected", stdout, containsString("expected='1'")); Assert.assertThat("No actual", stdout, containsString("actual='2'")); var consoleError = MockPrinter.fillPrinter(runner.getTestProxy()).getStdErr(); Assert.assertThat("No stacktrace", consoleError, containsString("test_test.py\", line 4,")); Assert.assertThat("Garbage in stack trace", consoleError, not(containsString("diff_tools.py"))); } }); }