(pyfile, run, target)
| 108 | @pytest.mark.parametrize("run", runners.all_launch) |
| 109 | @pytest.mark.parametrize("target", targets.all) |
| 110 | def test_nodebug(pyfile, run, target): |
| 111 | @pyfile |
| 112 | def code_to_debug(): |
| 113 | import debuggee |
| 114 | from debuggee import backchannel |
| 115 | |
| 116 | debuggee.setup() |
| 117 | backchannel.receive() # @ bp1 |
| 118 | print("ok") # @ bp2 |
| 119 | |
| 120 | with debug.Session() as session: |
| 121 | session.config["noDebug"] = True |
| 122 | session.config["redirectOutput"] = True |
| 123 | |
| 124 | backchannel = session.open_backchannel() |
| 125 | run(session, target(code_to_debug)) |
| 126 | |
| 127 | with pytest.raises(messaging.MessageHandlingError): |
| 128 | session.set_breakpoints(code_to_debug, all) |
| 129 | |
| 130 | backchannel.send(None) |
| 131 | |
| 132 | # Breakpoint shouldn't be hit. |
| 133 | pass |
| 134 | |
| 135 | assert "ok" in session.output("stdout") |
| 136 | |
| 137 | |
| 138 | @pytest.mark.skipif(sys.platform == "win32", reason="sudo not available on Windows") |
nothing calls this directly
no test coverage detected
searching dependent graphs…