Skip to content

Commit ce49aac

Browse files
committed
Debug
1 parent 6c78380 commit ce49aac

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ api = "sphinx-apidoc -o docs/api -f -E ipykernel tests ipykernel/datapub.py ipyk
9595
features = ["test"]
9696
[tool.hatch.envs.test.scripts]
9797
list = "python -m pip freeze"
98-
test = "python -m pytest -vv {args}"
98+
test = "python -m pytest -xvvrP {args}"
9999
nowarn = "test -W default {args}"
100100

101101
[tool.hatch.envs.cov]
102102
features = ["test", "cov"]
103103
[tool.hatch.envs.cov.scripts]
104-
test = "python -m pytest -vv --cov ipykernel --cov-branch --cov-report term-missing:skip-covered {args}"
104+
test = "python -m pytest -xvvrP --cov ipykernel --cov-branch --cov-report term-missing:skip-covered {args}"
105105
nowarn = "test -W default {args}"
106106

107107
[[tool.hatch.envs.cov.matrix]]
@@ -158,7 +158,7 @@ testpaths = [
158158
"tests",
159159
]
160160
asyncio_mode = "auto"
161-
timeout = 300
161+
timeout = 10
162162
# Restore this setting to debug failures
163163
#timeout_method = "thread"
164164
filterwarnings= [

tests/test_subshells.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ def test_run_concurrently_sequence(are_subshells, overlap, request):
127127

128128
# Import time module before running time-sensitive subshell code
129129
# and use threading.Barrier to synchronise start of subshell code.
130-
execute_request_subshell_id(
130+
msg = execute_request(
131131
kc, "import threading as t, time; b=t.Barrier(2); print('ok')", None
132132
)
133+
get_reply(kc, msg["msg_id"])
133134

134135
sleep = 0.5
135136
if overlap:
@@ -150,7 +151,9 @@ def test_run_concurrently_sequence(are_subshells, overlap, request):
150151
kc.shell_channel.send(msg)
151152
msgs.append(msg)
152153

154+
print("XXX before replies")
153155
replies = get_replies(kc, [msg["msg_id"] for msg in msgs], timeout=None)
156+
print("XXX after replies", len(replies))
154157

155158
for subshell_id in subshell_ids:
156159
if subshell_id:

tests/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def get_replies(kc, msg_ids: list[str], timeout=TIMEOUT, channel="shell"):
7171
while count < len(msg_ids):
7272
get_msg = getattr(kc, f"get_{channel}_msg")
7373
reply = get_msg(timeout=timeout)
74+
print("XXX reply", reply)
7475
try:
7576
msg_id = reply["parent_header"]["msg_id"]
7677
replies[msg_ids.index(msg_id)] = reply

0 commit comments

Comments
 (0)