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

Function test_pythonw_output

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

Source from the content-addressed store, hash-verified

176
177 @pytest.mark.parametrize("redirect_output", ["", "redirect_output"])
178 def test_pythonw_output(pyfile, target, run, redirect_output):
179 @pyfile
180 def code_to_debug():
181 import debuggee
182
183 debuggee.setup()
184 print("ok")
185 x = 4 # @wait_for_output
186
187 with debug.Session() as session:
188 # Don't capture launcher output - we want to see how it handles not
189 # having sys.stdin and sys.stdout available.
190 session.captured_output = set()
191
192 session.config["pythonPath"] = sys.executable + "/../pythonw.exe"
193 session.config["redirectOutput"] = bool(redirect_output)
194
195 with run(session, target(code_to_debug)):
196 session.set_breakpoints(code_to_debug, all)
197
198 session.wait_for_stop()
199 session.request_continue()
200
201 assert session.output("stdout") == ("ok\n" if redirect_output else "")

Callers

nothing calls this directly

Calls 6

set_breakpointsMethod · 0.80
wait_for_stopMethod · 0.80
request_continueMethod · 0.80
outputMethod · 0.80
runFunction · 0.70
targetFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…