MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_step_into_target_genexpr

Function test_step_into_target_genexpr

tests_python/test_debugger_json.py:6493–6518  ·  view source on GitHub ↗
(case_setup_dap)

Source from the content-addressed store, hash-verified

6491
6492
6493def 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
6521def test_function_breakpoints_basic(case_setup_dap, pyfile):

Callers

nothing calls this directly

Calls 9

write_set_breakpointsMethod · 0.95
get_step_in_targetsMethod · 0.95
write_step_inMethod · 0.95
write_continueMethod · 0.95
JsonFacadeClass · 0.85
test_fileMethod · 0.80

Tested by

no test coverage detected