MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / test_getattr_warning

Function test_getattr_warning

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

Source from the content-addressed store, hash-verified

2161
2162
2163def test_getattr_warning(case_setup_dap):
2164 with case_setup_dap.test_file("_debugger_case_warnings.py") as writer:
2165 json_facade = JsonFacade(writer)
2166
2167 writer.write_add_breakpoint(writer.get_line_index_with_content("break here"))
2168 json_facade.write_make_initial_run()
2169
2170 json_hit = json_facade.wait_for_thread_stopped()
2171 json_hit = json_facade.get_stack_as_json_hit(json_hit.thread_id)
2172
2173 variables_response = json_facade.get_variables_response(json_hit.frame_id)
2174
2175 for variable in variables_response.body.variables:
2176 if variable["evaluateName"] == "obj":
2177 break
2178 else:
2179 raise AssertionError('Did not find "obj" in %s' % (variables_response.body.variables,))
2180
2181 json_facade.evaluate("obj", json_hit.frame_id, context="hover")
2182 json_facade.evaluate("not_there", json_hit.frame_id, context="hover", success=False)
2183 json_facade.evaluate("not_there", json_hit.frame_id, context="watch", success=False)
2184
2185 json_facade.write_continue()
2186
2187 # i.e.: the test will fail if anything is printed to stderr!
2188 writer.finished_ok = True
2189
2190
2191def test_warning_on_repl(case_setup_dap):

Callers

nothing calls this directly

Calls 10

get_stack_as_json_hitMethod · 0.95
evaluateMethod · 0.95
write_continueMethod · 0.95
JsonFacadeClass · 0.85
test_fileMethod · 0.80
write_add_breakpointMethod · 0.80

Tested by

no test coverage detected