(case_setup_dap)
| 1636 | |
| 1637 | |
| 1638 | def test_case_update_rules(case_setup_dap): |
| 1639 | with case_setup_dap.test_file("my_code/my_code.py") as writer: |
| 1640 | json_facade = JsonFacade(writer) |
| 1641 | json_facade.write_launch( |
| 1642 | rules=[ |
| 1643 | {"path": "**/other.py", "include": False}, |
| 1644 | ] |
| 1645 | ) |
| 1646 | |
| 1647 | break_line = writer.get_line_index_with_content("break here") |
| 1648 | json_facade.write_set_breakpoints(break_line) |
| 1649 | json_facade.write_make_initial_run() |
| 1650 | |
| 1651 | json_facade.wait_for_json_message(ThreadEvent, lambda event: event.body.reason == "started") |
| 1652 | |
| 1653 | json_hit = json_facade.wait_for_thread_stopped(line=break_line) |
| 1654 | json_facade.reset_sent_launch_or_attach() |
| 1655 | json_facade.write_launch( |
| 1656 | rules=[ |
| 1657 | {"path": "**/other.py", "include": True}, |
| 1658 | ] |
| 1659 | ) |
| 1660 | json_facade.write_step_in(json_hit.thread_id) |
| 1661 | # Not how we stoppen in the file that wasn't initially included. |
| 1662 | json_hit = json_facade.wait_for_thread_stopped("step", name="call_me_back1") |
| 1663 | |
| 1664 | json_facade.reset_sent_launch_or_attach() |
| 1665 | json_facade.write_launch( |
| 1666 | rules=[ |
| 1667 | {"path": "**/other.py", "include": False}, |
| 1668 | ] |
| 1669 | ) |
| 1670 | json_facade.write_step_in(json_hit.thread_id) |
| 1671 | # Not how we go back to the callback and not to the `call_me_back1` because |
| 1672 | # `call_me_back1` is now excluded again. |
| 1673 | json_hit = json_facade.wait_for_thread_stopped("step", name="callback1") |
| 1674 | |
| 1675 | json_facade.write_continue() |
| 1676 | writer.finished_ok = True |
| 1677 | |
| 1678 | |
| 1679 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected