Skip to content

Commit 4c6c817

Browse files
committed
python: document intentional ExceptionGroup swallow in sessions.list e2e
CodeQL flagged the new `except ExceptionGroup: pass` in the sessions.list teardown as an empty except clause with no explanation. Add the same explanatory comment the four other identical teardowns in this file already carry. Also wrap the enqueue `session.send(...)` call, which was 104 characters and failed the repo's 100-column ruff lint.
1 parent 59ce28d commit 4c6c817

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

python/e2e/test_rpc_server_e2e.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ async def test_should_list_find_and_inspect_persisted_session_state(
304304
on_permission_request=PermissionHandler.approve_all,
305305
)
306306

307-
await session.send("Record a turn for sessions.list discriminator coverage", mode="enqueue")
307+
await session.send(
308+
"Record a turn for sessions.list discriminator coverage", mode="enqueue"
309+
)
308310
await asyncio.sleep(0.2)
309311
save = await client.rpc.sessions.save(SessionsSaveRequest(session_id=session_id))
310312
assert save is not None
@@ -358,6 +360,9 @@ async def test_should_list_find_and_inspect_persisted_session_state(
358360
try:
359361
await client.stop()
360362
except ExceptionGroup:
363+
# Intentional: shutting down the per-test client can race the
364+
# CLI's own teardown and surface as an aggregated cancellation
365+
# error from anyio. We don't want it to fail the test.
361366
pass
362367

363368
async def test_should_enrich_basic_session_metadata(self, ctx: E2ETestContext):

0 commit comments

Comments
 (0)