(case_setup_dap)
| 6491 | |
| 6492 | |
| 6493 | def test_step_into_target_genexpr(case_setup_dap): |
| 6494 | with case_setup_dap.test_file("_debugger_case_smart_step_into3.py") as writer: |
| 6495 | json_facade = JsonFacade(writer) |
| 6496 | |
| 6497 | bp = writer.get_line_index_with_content("break here") |
| 6498 | json_facade.write_set_breakpoints([bp]) |
| 6499 | json_facade.write_make_initial_run() |
| 6500 | |
| 6501 | # At this point we know that 'do_something' was called at least once. |
| 6502 | hit = json_facade.wait_for_thread_stopped(line=bp) |
| 6503 | |
| 6504 | # : :type step_in_targets: List[StepInTarget] |
| 6505 | step_in_targets = json_facade.get_step_in_targets(hit.frame_id) |
| 6506 | label_to_id = dict((target["label"], target["id"]) for target in step_in_targets) |
| 6507 | if IS_PY311_OR_GREATER: |
| 6508 | assert set(label_to_id) == {"foo(arg)", "list(gen)"} |
| 6509 | json_facade.write_step_in(hit.thread_id, target_id=label_to_id["foo(arg)"]) |
| 6510 | else: |
| 6511 | assert set(label_to_id) == {"foo", "list"} |
| 6512 | json_facade.write_step_in(hit.thread_id, target_id=label_to_id["foo"]) |
| 6513 | |
| 6514 | on_foo_mark_line = writer.get_line_index_with_content("on foo mark") |
| 6515 | hit = json_facade.wait_for_thread_stopped(reason="step", line=on_foo_mark_line) |
| 6516 | json_facade.write_continue() |
| 6517 | |
| 6518 | writer.finished_ok = True |
| 6519 | |
| 6520 | |
| 6521 | def test_function_breakpoints_basic(case_setup_dap, pyfile): |
nothing calls this directly
no test coverage detected