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

Function test_case_json_protocol

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

Source from the content-addressed store, hash-verified

1520
1521
1522def test_case_json_protocol(case_setup_dap):
1523 with case_setup_dap.test_file("_debugger_case_print.py") as writer:
1524 json_facade = JsonFacade(writer)
1525
1526 json_facade.write_launch()
1527 break_line = writer.get_line_index_with_content("Break here")
1528 json_facade.write_set_breakpoints(break_line)
1529 json_facade.write_make_initial_run()
1530
1531 json_facade.wait_for_json_message(ThreadEvent, lambda event: event.body.reason == "started")
1532
1533 json_facade.wait_for_thread_stopped(line=break_line)
1534
1535 # : :type response: ThreadsResponse
1536 response = json_facade.write_list_threads()
1537 assert len(response.body.threads) == 1
1538 assert next(iter(response.body.threads))["name"] == "MainThread"
1539
1540 # Removes breakpoints and proceeds running.
1541 json_facade.write_disconnect()
1542
1543 writer.finished_ok = True
1544
1545
1546def test_case_started_exited_threads_protocol(case_setup_dap):

Callers

nothing calls this directly

Calls 10

write_launchMethod · 0.95
write_set_breakpointsMethod · 0.95
wait_for_json_messageMethod · 0.95
write_list_threadsMethod · 0.95
write_disconnectMethod · 0.95
JsonFacadeClass · 0.85
test_fileMethod · 0.80

Tested by

no test coverage detected