(case_setup_dap)
| 2345 | |
| 2346 | |
| 2347 | def test_evaluate_no_name_mangling(case_setup_dap): |
| 2348 | with case_setup_dap.test_file("_debugger_case_local_variables2.py") as writer: |
| 2349 | json_facade = JsonFacade(writer) |
| 2350 | |
| 2351 | writer.write_add_breakpoint(writer.get_line_index_with_content("Break here")) |
| 2352 | json_facade.write_make_initial_run() |
| 2353 | |
| 2354 | json_hit = json_facade.wait_for_thread_stopped() |
| 2355 | json_hit = json_facade.get_stack_as_json_hit(json_hit.thread_id) |
| 2356 | |
| 2357 | # Check eval with a properly indented block |
| 2358 | evaluate_response = json_facade.evaluate('x = "_"', frameId=json_hit.frame_id, context="repl") |
| 2359 | assert not evaluate_response.body.result |
| 2360 | |
| 2361 | evaluate_response = json_facade.evaluate("x", frameId=json_hit.frame_id, context="repl") |
| 2362 | assert evaluate_response.body.result == "'_'" |
| 2363 | |
| 2364 | evaluate_response = json_facade.evaluate('y = "__"', frameId=json_hit.frame_id, context="repl") |
| 2365 | assert not evaluate_response.body.result |
| 2366 | |
| 2367 | evaluate_response = json_facade.evaluate("y", frameId=json_hit.frame_id, context="repl") |
| 2368 | assert evaluate_response.body.result == "'__'" |
| 2369 | |
| 2370 | evaluate_response = json_facade.evaluate("None", json_hit.frame_id, context="repl") |
| 2371 | assert not evaluate_response.body.result |
| 2372 | |
| 2373 | json_facade.write_continue() |
| 2374 | writer.finished_ok = True |
| 2375 | |
| 2376 | |
| 2377 | def test_evaluate_block_repl(case_setup_dap): |
nothing calls this directly
no test coverage detected