(case_setup_dap)
| 5854 | |
| 5855 | |
| 5856 | def test_gui_event_loop_qt5(case_setup_dap): |
| 5857 | try: |
| 5858 | from PySide2 import QtCore |
| 5859 | except ImportError: |
| 5860 | pytest.skip("PySide2 not available") |
| 5861 | |
| 5862 | with case_setup_dap.test_file("_debugger_case_gui_event_loop_qt5.py") as writer: |
| 5863 | json_facade = JsonFacade(writer) |
| 5864 | json_facade.write_launch(guiEventLoop="qt5", redirectOutput=True) |
| 5865 | break_line = writer.get_line_index_with_content("break here") |
| 5866 | json_facade.write_set_breakpoints(break_line) |
| 5867 | |
| 5868 | json_facade.write_make_initial_run() |
| 5869 | json_facade.wait_for_thread_stopped() |
| 5870 | |
| 5871 | # i.e.: if we don't have the event loop running in this test, this |
| 5872 | # output is not shown (as the QTimer timeout wouldn't be executed). |
| 5873 | for _i in range(3): |
| 5874 | json_facade.wait_for_json_message( |
| 5875 | OutputEvent, lambda msg: msg.body.category == "stdout" and "on_timeout() called" in msg.body.output |
| 5876 | ) |
| 5877 | |
| 5878 | json_facade.write_continue() |
| 5879 | json_facade.wait_for_terminated() |
| 5880 | writer.finished_ok = True |
| 5881 | |
| 5882 | |
| 5883 | @pytest.mark.parametrize("debug_stdlib", [True, False]) |
nothing calls this directly
no test coverage detected