(start_flask)
| 214 | |
| 215 | |
| 216 | def test_flask_breakpoint_multiproc(start_flask): |
| 217 | bp_line = lines.app_py["bphome"] |
| 218 | bp_var_content = "Flask-Jinja-Test" |
| 219 | |
| 220 | with debug.Session() as parent_session: |
| 221 | with start_flask(parent_session, multiprocess=True): |
| 222 | parent_session.set_breakpoints(paths.app_py, [bp_line]) |
| 223 | |
| 224 | with parent_session.wait_for_next_subprocess() as child_session: |
| 225 | with child_session.start(): |
| 226 | child_session.set_breakpoints(paths.app_py, [bp_line]) |
| 227 | |
| 228 | with flask_server: |
| 229 | home_request = flask_server.get("/") |
| 230 | child_session.wait_for_stop( |
| 231 | "breakpoint", |
| 232 | expected_frames=[ |
| 233 | some.dap.frame( |
| 234 | some.dap.source(paths.app_py), line=bp_line, name="home" |
| 235 | ) |
| 236 | ], |
| 237 | ) |
| 238 | |
| 239 | var_content = child_session.get_variable("content") |
| 240 | assert var_content == some.dict.containing( |
| 241 | { |
| 242 | "name": "content", |
| 243 | "type": "str", |
| 244 | "value": repr(bp_var_content), |
| 245 | "presentationHint": {"attributes": ["rawString"]}, |
| 246 | "evaluateName": "content", |
| 247 | "variablesReference": 0, |
| 248 | } |
| 249 | ) |
| 250 | |
| 251 | child_session.request_continue() |
| 252 | assert bp_var_content in home_request.response_text() |
nothing calls this directly
no test coverage detected
searching dependent graphs…