(case_setup_dap)
| 2189 | |
| 2190 | |
| 2191 | def 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 | |
| 2212 | def test_evaluate_none(case_setup_dap, pyfile): |
nothing calls this directly
no test coverage detected