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

Function check

tests_python/test_debugger.py:1595–1609  ·  view source on GitHub ↗
(hit, exc_type, exc_desc)

Source from the content-addressed store, hash-verified

1593 writer.write_make_initial_run()
1594
1595 def check(hit, exc_type, exc_desc):
1596 writer.write_get_current_exception(hit.thread_id)
1597 msg = writer.wait_for_message(
1598 accept_message=lambda msg: exc_type in msg and 'exc_type="' in msg and 'exc_desc="' in msg, unquote_msg=False
1599 )
1600 assert unquote(msg.thread["exc_desc"]) == exc_desc
1601 assert unquote(msg.thread["exc_type"]) in (
1602 "<type 'exceptions.%s'>" % (exc_type,), # py2
1603 "<class '%s'>" % (exc_type,), # py3
1604 )
1605 if len(msg.thread.frame) == 0:
1606 assert unquote(unquote(msg.thread.frame["file"])).endswith("_debugger_case_unhandled_exceptions.py")
1607 else:
1608 assert unquote(unquote(msg.thread.frame[0]["file"])).endswith("_debugger_case_unhandled_exceptions.py")
1609 writer.write_run_thread(hit.thread_id)
1610
1611 # Will stop in 2 background threads
1612 hit0 = writer.wait_for_breakpoint_hit(REASON_UNCAUGHT_EXCEPTION)

Callers 3

test_pydevd_reloadMethod · 0.50

Calls 5

unquoteFunction · 0.85
wait_for_messageMethod · 0.80
write_run_threadMethod · 0.80
write_get_frameMethod · 0.80

Tested by

no test coverage detected