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

Function _check_current_line

tests_python/test_debugger_json.py:966–978  ·  view source on GitHub ↗
(json_hit, current_line)

Source from the content-addressed store, hash-verified

964
965
966def _check_current_line(json_hit, current_line):
967 if not isinstance(current_line, (list, tuple)):
968 current_line = (current_line,)
969 for frame in json_hit.stack_trace_response.body.stackFrames:
970 if "(Current frame)" in frame["name"]:
971 if frame["line"] not in current_line:
972 rep = json.dumps(json_hit.stack_trace_response.body.stackFrames, indent=4)
973 raise AssertionError("Expected: %s to be one of: %s\nFrames:\n%s." % (frame["line"], current_line, rep))
974
975 break
976 else:
977 rep = json.dumps(json_hit.stack_trace_response.body.stackFrames, indent=4)
978 raise AssertionError("Could not find (Current frame) in any frame name in: %s." % (rep))
979
980
981@pytest.mark.parametrize("stop", [False, True])

Calls 1

dumpsMethod · 0.80

Tested by

no test coverage detected