Skip to content

Commit 0926542

Browse files
committed
Debug
1 parent ae8b540 commit 0926542

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/test_subshells.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def create_subshell_helper(kc: BlockingKernelClient):
2020
kc.control_channel.send(msg)
2121
msg_id = msg["header"]["msg_id"]
2222
reply = get_reply(kc, msg_id, TIMEOUT, channel="control")
23-
assemble_output(kc.get_iopub_msg) # wait for idle
23+
assemble_output(kc.get_iopub_msg, None) # wait for idle
2424
return reply["content"]
2525

2626

@@ -29,7 +29,7 @@ def delete_subshell_helper(kc: BlockingKernelClient, subshell_id: str):
2929
kc.control_channel.send(msg)
3030
msg_id = msg["header"]["msg_id"]
3131
reply = get_reply(kc, msg_id, TIMEOUT, channel="control")
32-
assemble_output(kc.get_iopub_msg) # wait for idle
32+
assemble_output(kc.get_iopub_msg, None) # wait for idle
3333
return reply["content"]
3434

3535

@@ -38,7 +38,7 @@ def list_subshell_helper(kc: BlockingKernelClient):
3838
kc.control_channel.send(msg)
3939
msg_id = msg["header"]["msg_id"]
4040
reply = get_reply(kc, msg_id, TIMEOUT, channel="control")
41-
assemble_output(kc.get_iopub_msg) # wait for idle
41+
assemble_output(kc.get_iopub_msg, None) # wait for idle
4242
return reply["content"]
4343

4444

@@ -53,7 +53,7 @@ def execute_request_subshell_id(
5353
kc: BlockingKernelClient, code: str, subshell_id: str | None, terminator: str = "\n"
5454
):
5555
execute_request(kc, code, subshell_id)
56-
stdout, _ = assemble_output(kc.get_iopub_msg)
56+
stdout, _ = assemble_output(kc.get_iopub_msg, None)
5757
return stdout.strip()
5858

5959

tests/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ def new_kernel(argv=None):
171171
return manager.run_kernel(**kwargs)
172172

173173

174-
def assemble_output(get_msg):
174+
def assemble_output(get_msg, timeout=1):
175175
"""assemble stdout/err from an execution"""
176176
stdout = ""
177177
stderr = ""
178178
while True:
179-
msg = get_msg(timeout=1)
179+
msg = get_msg(timeout=timeout)
180180
msg_type = msg["msg_type"]
181181
content = msg["content"]
182182
if msg_type == "status" and content["execution_state"] == "idle":

0 commit comments

Comments
 (0)