MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / test_case_dump_threads_to_stderr

Function test_case_dump_threads_to_stderr

tests_python/test_debugger.py:2631–2653  ·  view source on GitHub ↗
(case_setup)

Source from the content-addressed store, hash-verified

2629
2630
2631def test_case_dump_threads_to_stderr(case_setup):
2632 from tests_python.debugger_unittest import wait_for_condition
2633
2634 def additional_output_checks(writer, stdout, stderr):
2635 assert is_stderr_ok(stderr), make_error_msg(stderr)
2636
2637 def make_error_msg(stderr):
2638 return "Did not find thread dump in stderr. stderr:\n%s" % (stderr,)
2639
2640 def is_stderr_ok(stderr):
2641 return "Thread Dump" in stderr and "Thread pydevd.CommandThread (daemon: True, pydevd thread: True)" in stderr
2642
2643 with case_setup.test_file("_debugger_case_get_thread_stack.py", additional_output_checks=additional_output_checks) as writer:
2644 writer.write_add_breakpoint(12, None)
2645 writer.write_make_initial_run()
2646
2647 hit = writer.wait_for_breakpoint_hit(REASON_STOP_ON_BREAKPOINT)
2648
2649 writer.write_dump_threads()
2650 wait_for_condition(lambda: is_stderr_ok(writer.get_stderr()), lambda: make_error_msg(writer.get_stderr()))
2651 writer.write_run_thread(hit.thread_id)
2652
2653 writer.finished_ok = True
2654
2655
2656def test_stop_on_start_regular(case_setup):

Callers

nothing calls this directly

Calls 9

wait_for_conditionFunction · 0.90
is_stderr_okFunction · 0.85
make_error_msgFunction · 0.85
test_fileMethod · 0.80
write_add_breakpointMethod · 0.80
write_run_threadMethod · 0.80
write_dump_threadsMethod · 0.45

Tested by

no test coverage detected