(case_setup_dap)
| 2161 | |
| 2162 | |
| 2163 | def 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 | |
| 2191 | def test_warning_on_repl(case_setup_dap): |
nothing calls this directly
no test coverage detected