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

Function test_with_no_output

tests/debugpy/test_output.py:19–48  ·  view source on GitHub ↗
(pyfile, target, run)

Source from the content-addressed store, hash-verified

17
18@pytest.mark.parametrize("run", runners.all)
19def test_with_no_output(pyfile, target, run):
20 @pyfile
21 def code_to_debug():
22 import debuggee
23
24 debuggee.setup()
25 x = 4 # @wait_for_output
26
27 with debug.Session() as session:
28 session.config["redirectOutput"] = True
29
30 with run(session, target(code_to_debug)):
31 session.set_breakpoints(code_to_debug, all)
32
33 session.wait_for_stop("breakpoint")
34 session.request_continue()
35
36 output = session.output("stdout")
37 lines = []
38 for line in output.splitlines(keepends=True):
39 if not line.startswith("Attaching to PID:"):
40 lines.append(line)
41
42 output = "".join(lines)
43
44 assert not output
45 assert not session.output("stderr")
46 if session.debuggee is not None:
47 assert not session.captured_stdout()
48 assert not session.captured_stderr()
49
50
51def test_with_tab_in_output(pyfile, target, run):

Callers

nothing calls this directly

Calls 10

set_breakpointsMethod · 0.80
wait_for_stopMethod · 0.80
request_continueMethod · 0.80
outputMethod · 0.80
captured_stdoutMethod · 0.80
captured_stderrMethod · 0.80
runFunction · 0.70
targetFunction · 0.70
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…