(case_setup, show)
| 3459 | ) |
| 3460 | @pytest.mark.parametrize("show", [True, False]) |
| 3461 | def test_gevent_show_paused_greenlets(case_setup, show): |
| 3462 | def get_environ(writer): |
| 3463 | env = os.environ.copy() |
| 3464 | env["GEVENT_SUPPORT"] = "True" |
| 3465 | if show: |
| 3466 | env["GEVENT_SHOW_PAUSED_GREENLETS"] = "True" |
| 3467 | else: |
| 3468 | env["GEVENT_SHOW_PAUSED_GREENLETS"] = "False" |
| 3469 | return env |
| 3470 | |
| 3471 | with case_setup.test_file("_debugger_case_gevent_simple.py", get_environ=get_environ) as writer: |
| 3472 | writer.write_add_breakpoint(writer.get_line_index_with_content("break here")) |
| 3473 | writer.write_make_initial_run() |
| 3474 | hit = writer.wait_for_breakpoint_hit(name="bar") |
| 3475 | writer.write_run_thread(hit.thread_id) |
| 3476 | |
| 3477 | seq = writer.write_list_threads() |
| 3478 | msg = writer.wait_for_list_threads(seq) |
| 3479 | |
| 3480 | if show: |
| 3481 | assert len(msg) > 1 |
| 3482 | else: |
| 3483 | assert len(msg) == 1 |
| 3484 | |
| 3485 | writer.finished_ok = True |
| 3486 | |
| 3487 | |
| 3488 | @pytest.mark.skipif(not TEST_GEVENT, reason="Gevent not installed.") |
nothing calls this directly
no test coverage detected