(q, a)
| 59 | pass |
| 60 | |
| 61 | def parent(q, a): |
| 62 | from debuggee import backchannel |
| 63 | |
| 64 | debuggee.setup() |
| 65 | |
| 66 | print("spawning child") |
| 67 | p = multiprocessing.Process(target=child, args=(q, a)) |
| 68 | p.start() |
| 69 | print("child spawned") |
| 70 | |
| 71 | q.put("foo?") |
| 72 | foo = a.get() |
| 73 | assert isinstance(foo, Foo), repr(foo) |
| 74 | |
| 75 | q.put("child_pid?") |
| 76 | what, child_pid = a.get() |
| 77 | assert what == "child_pid" |
| 78 | backchannel.send(child_pid) |
| 79 | |
| 80 | q.put("grandchild_pid?") |
| 81 | what, grandchild_pid = a.get() |
| 82 | assert what == "grandchild_pid" |
| 83 | backchannel.send(grandchild_pid) |
| 84 | |
| 85 | assert backchannel.receive() == "continue" |
| 86 | q.put("exit!") |
| 87 | p.join() |
| 88 | |
| 89 | def child(q, a): |
| 90 | print("entering child") # @bp |
no test coverage detected
searching dependent graphs…