MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_variables_on_call

Function test_variables_on_call

tests_python/test_sys_monitoring.py:122–138  ·  view source on GitHub ↗
(with_monitoring)

Source from the content-addressed store, hash-verified

120
121
122def 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
141def test_disabling_code(with_monitoring):

Callers

nothing calls this directly

Calls 1

methodFunction · 0.70

Tested by

no test coverage detected