void () { runPythonTest(new PyUnitTestProcessWithConsoleTestTask("testRunner/env/unit/", "test_subtest.py", 1) { @Override protected void checkTestResults(@NotNull PyUnitTestProcessRunner runner, @NotNull String stdout, @NotNull String stderr, @NotNull String all, int exitCode) { final String expectedResult = """ Test tree: [root](-) .test_subtest(-) ..SpamTest(-) ...test_test(-) ....(i=0)(-) ....(i=1)(+) ....(i=2)(-) ....(i=3)(+) ....(i=4)(-) ....(i=5)(+) ....(i=6)(-) ....(i=7)(+) ....(i=8)(-) ....(i=9)(+) """; final String tree = runner.getFormattedTestTree(); assertEquals("Bad tree:" + tree + ". \nStdout:" + stdout + "\n. Stderr: " + stderr, expectedResult, tree); } }); }