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

Function test_warning_on_repl

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

Source from the content-addressed store, hash-verified

2189
2190
2191def test_warning_on_repl(case_setup_dap):
2192
2193 def additional_output_checks(writer, stdout, stderr):
2194 assert "WarningCalledOnRepl" in stderr
2195
2196 with case_setup_dap.test_file("_debugger_case_evaluate.py", additional_output_checks=additional_output_checks) as writer:
2197 json_facade = JsonFacade(writer)
2198
2199 json_facade.write_set_breakpoints(writer.get_line_index_with_content("Break here"))
2200 json_facade.write_make_initial_run()
2201
2202 json_hit = json_facade.wait_for_thread_stopped()
2203
2204 # We want warnings from the in evaluate in the repl (but not hover/watch).
2205 json_facade.evaluate('import warnings; warnings.warn("WarningCalledOnRepl")', json_hit.frame_id, context="repl")
2206
2207 json_facade.write_continue()
2208
2209 writer.finished_ok = True
2210
2211
2212def test_evaluate_none(case_setup_dap, pyfile):

Callers

nothing calls this directly

Calls 8

write_set_breakpointsMethod · 0.95
evaluateMethod · 0.95
write_continueMethod · 0.95
JsonFacadeClass · 0.85
test_fileMethod · 0.80

Tested by

no test coverage detected