Skip to content

Commit 171a01f

Browse files
committed
test: mark replay_sender's stream-id check no-branch for 3.10 coverage
The False arc exits through the enclosing async-with and is dropped by coverage.py on 3.10 only; 3.11+ record both arcs.
1 parent 7a026f2 commit 171a01f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mcp/server/streamable_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ async def send_event(event_message: EventMessage) -> None:
904904
stream_id = await event_store.replay_events_after(last_event_id, send_event)
905905

906906
# If stream ID not in mapping, create it
907-
if stream_id and stream_id not in self._request_streams:
907+
if stream_id and stream_id not in self._request_streams: # pragma: no branch
908908
# Register SSE writer so close_sse_stream() can close it
909909
self._sse_stream_writers[stream_id] = sse_stream_writer
910910

0 commit comments

Comments
 (0)