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

Function test_modules

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

Source from the content-addressed store, hash-verified

1894
1895
1896def test_modules(case_setup_dap):
1897 with case_setup_dap.test_file("_debugger_case_local_variables.py") as writer:
1898 json_facade = JsonFacade(writer)
1899
1900 writer.write_add_breakpoint(writer.get_line_index_with_content("Break 2 here"))
1901 json_facade.write_make_initial_run()
1902
1903 stopped_event = json_facade.wait_for_json_message(StoppedEvent)
1904 thread_id = stopped_event.body.threadId
1905
1906 json_facade.write_request(pydevd_schema.StackTraceRequest(pydevd_schema.StackTraceArguments(threadId=thread_id)))
1907
1908 json_facade.wait_for_json_message(ModuleEvent)
1909
1910 # : :type response: ModulesResponse
1911 # : :type modules_response_body: ModulesResponseBody
1912 response = json_facade.wait_for_response(json_facade.write_request(pydevd_schema.ModulesRequest(pydevd_schema.ModulesArguments())))
1913 modules_response_body = response.body
1914 assert len(modules_response_body.modules) == 1
1915 module = next(iter(modules_response_body.modules))
1916 assert module["name"] == "__main__"
1917 assert module["path"].endswith("_debugger_case_local_variables.py")
1918
1919 json_facade.write_continue()
1920 writer.finished_ok = True
1921
1922
1923def test_dict_ordered(case_setup_dap):

Callers

nothing calls this directly

Calls 9

wait_for_json_messageMethod · 0.95
write_requestMethod · 0.95
wait_for_responseMethod · 0.95
write_continueMethod · 0.95
JsonFacadeClass · 0.85
test_fileMethod · 0.80
write_add_breakpointMethod · 0.80

Tested by

no test coverage detected