(pyfile, target, run, redirect_output)
| 34 | @pytest.mark.parametrize("run", runners.all_launch_terminal + runners.all_attach) |
| 35 | @pytest.mark.parametrize("redirect_output", ["", "redirect_output"]) |
| 36 | def test_input(pyfile, target, run, redirect_output): |
| 37 | @pyfile |
| 38 | def code_to_debug(): |
| 39 | import debuggee |
| 40 | from debuggee import backchannel |
| 41 | |
| 42 | try: |
| 43 | input = raw_input |
| 44 | except NameError: |
| 45 | pass |
| 46 | |
| 47 | debuggee.setup() |
| 48 | backchannel.send(input()) |
| 49 | |
| 50 | with debug.Session() as session: |
| 51 | session.config["redirectOutput"] = bool(redirect_output) |
| 52 | |
| 53 | backchannel = session.open_backchannel() |
| 54 | with run(session, target(code_to_debug)): |
| 55 | pass |
| 56 | |
| 57 | session.debuggee.stdin.write(b"ok\n") |
| 58 | s = backchannel.receive() |
| 59 | assert s == "ok" |
nothing calls this directly
no test coverage detected
searching dependent graphs…