void () { runPythonTest(new PyDebuggerTask("/debug", "test_set_value_list.py") { @Override public void before() { toggleBreakpoint(getFilePath(getScriptName()), 2); } @Override public void testing() throws Exception { waitForPause(); List<PyDebugValue> frameVariables = loadFrame(); PyDebugValue var = findDebugValueByName(frameVariables, "lst"); List<XValue> children = XDebuggerTestUtil.collectChildren(var); PyDebugValue one = (PyDebugValue)children.get(0); PyDebugValue two = (PyDebugValue)children.get(1); PyDebugValue three = (PyDebugValue)children.get(2); eval("lst[0]").hasValue("1"); myDebugProcess.changeVariable(one, "\"change\""); eval("lst[0]").hasValue("'change'"); eval("lst[1]").hasValue("2"); myDebugProcess.changeVariable(two, "['1', '2', '3']"); eval("lst[1]").hasValue("['1', '2', '3']"); eval("lst[2]").hasValue("3"); myDebugProcess.changeVariable(three, "{'one': 1, 'two': 2}"); SoftAssertions.assertSoftly(softly -> softly .assertThat(eval("lst[2]").getValue()) .as("lst[2]") .isIn("{'one': 1, 'two': 2}", "{'two': 2, 'one': 1}") ); children = XDebuggerTestUtil.collectChildren(var); three = (PyDebugValue)children.get(2); one = getDictItem(three, "'one'"); eval("lst[2]['one']").hasValue("1"); myDebugProcess.changeVariable(one, "'hello'"); eval("lst[2]['one']").hasValue("'hello'"); } }); }