(case_setup)
| 2629 | |
| 2630 | |
| 2631 | def 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 | |
| 2656 | def test_stop_on_start_regular(case_setup): |
nothing calls this directly
no test coverage detected