MCPcopy Create free account
hub / github.com/microsoft/debugpy / test_input

Function test_input

tests/debugpy/test_input.py:36–59  ·  view source on GitHub ↗
(pyfile, target, run, redirect_output)

Source from the content-addressed store, hash-verified

34@pytest.mark.parametrize("run", runners.all_launch_terminal + runners.all_attach)
35@pytest.mark.parametrize("redirect_output", ["", "redirect_output"])
36def 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"

Callers

nothing calls this directly

Calls 5

open_backchannelMethod · 0.80
receiveMethod · 0.80
runFunction · 0.70
targetFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…