void () { runPythonTest(new PyDebuggerTask("/debug", "test_set_next_statement.py") { @Override public void before() { toggleBreakpoint(getFilePath(getScriptName()), 1); toggleBreakpoint(getFilePath(getScriptName()), 6); } @Override public void testing() throws Exception { waitForPause(); eval("x").hasValue("0"); // jump on a top level Pair<Boolean, String> pair = setNextStatement(7); waitForPause(); assertTrue(pair.first); eval("x").hasValue("0"); // try to jump into a loop pair = setNextStatement(9); // do not wait for pause here, because we don't refresh suspension for incorrect jumps assertFalse(pair.first); assertTrue(pair.second.startsWith("Error:")); stepOver(); waitForPause(); eval("x").hasValue("2"); resume(); waitForPause(); eval("a").hasValue("2"); // jump inside a function pair = setNextStatement(2); waitForPause(); assertTrue(pair.first); eval("a").hasValue("2"); resume(); } @NotNull @Override public Set<String> getTags() { return ImmutableSet.of("-iron", "-python3.8", "-python3.9", "-python3.10", "-python3.11", "-python3.12"); // PY-38604 } }); }