(case_setup)
| 453 | |
| 454 | @pytest.mark.skipif(IS_IRONPYTHON, reason="This test is flaky on Jython, so, skipping it.") |
| 455 | def test_case_7(case_setup): |
| 456 | # This test checks that we start without variables and at each step a new var is created, but on ironpython, |
| 457 | # the variables exist all at once (with None values), so, we can't test it properly. |
| 458 | with case_setup.test_file("_debugger_case_local_variables.py") as writer: |
| 459 | writer.write_add_breakpoint(writer.get_line_index_with_content("Break here"), "Call") |
| 460 | writer.write_make_initial_run() |
| 461 | |
| 462 | hit = writer.wait_for_breakpoint_hit("111") |
| 463 | |
| 464 | writer.write_get_frame(hit.thread_id, hit.frame_id) |
| 465 | |
| 466 | writer.wait_for_vars("<xml></xml>") # no vars at this point |
| 467 | |
| 468 | writer.write_step_over(hit.thread_id) |
| 469 | |
| 470 | writer.wait_for_breakpoint_hit("108") |
| 471 | |
| 472 | writer.write_get_frame(hit.thread_id, hit.frame_id) |
| 473 | |
| 474 | writer.wait_for_vars( |
| 475 | [ |
| 476 | [ |
| 477 | '<xml><var name="variable_for_test_1" type="int" qualifier="{0}" value="int%253A 10" />%0A</xml>'.format( |
| 478 | builtin_qualifier |
| 479 | ), |
| 480 | '<var name="variable_for_test_1" type="int" value="int', # jython |
| 481 | ] |
| 482 | ] |
| 483 | ) |
| 484 | |
| 485 | writer.write_step_over(hit.thread_id) |
| 486 | |
| 487 | writer.wait_for_breakpoint_hit("108") |
| 488 | |
| 489 | writer.write_get_frame(hit.thread_id, hit.frame_id) |
| 490 | |
| 491 | writer.wait_for_vars( |
| 492 | [ |
| 493 | [ |
| 494 | '<xml><var name="variable_for_test_1" type="int" qualifier="{0}" value="int%253A 10" />%0A<var name="variable_for_test_2" type="int" qualifier="{0}" value="int%253A 20" />%0A</xml>'.format( |
| 495 | builtin_qualifier |
| 496 | ), |
| 497 | '<var name="variable_for_test_1" type="int" value="int%253A 10" />%0A<var name="variable_for_test_2" type="int" value="int%253A 20" />%0A', # jython |
| 498 | ] |
| 499 | ] |
| 500 | ) |
| 501 | |
| 502 | writer.write_run_thread(hit.thread_id) |
| 503 | |
| 504 | assert 17 == writer._sequence, "Expected 17. Had: %s" % writer._sequence |
| 505 | |
| 506 | writer.finished_ok = True |
| 507 | |
| 508 | |
| 509 | def test_case_8(case_setup): |
nothing calls this directly
no test coverage detected