(pyfile, target, run, redirect_output)
| 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 "") |
nothing calls this directly
no test coverage detected
searching dependent graphs…