(with_monitoring)
| 120 | |
| 121 | |
| 122 | def test_variables_on_call(with_monitoring): |
| 123 | monitor.set_events(DEBUGGER_ID, monitor.events.PY_START) |
| 124 | |
| 125 | found = [] |
| 126 | |
| 127 | def _start_method(code, offset): |
| 128 | if code.co_name == "method": |
| 129 | frame = sys._getframe(1) |
| 130 | found.append(frame.f_locals["arg1"]) |
| 131 | |
| 132 | monitor.register_callback(DEBUGGER_ID, monitor.events.PY_START, _start_method) |
| 133 | |
| 134 | def method(arg1): |
| 135 | pass |
| 136 | |
| 137 | method(22) |
| 138 | assert found == [22] |
| 139 | |
| 140 | |
| 141 | def test_disabling_code(with_monitoring): |