@@ -79,7 +79,7 @@ def extract_protocol_version_from_sse(response: requests.Response) -> str:
7979 if line .startswith ("data: " ):
8080 init_data = json .loads (line [6 :])
8181 return init_data ["result" ]["protocolVersion" ]
82- raise ValueError ("Could not extract protocol version from SSE response" )
82+ raise ValueError ("Could not extract protocol version from SSE response" ) # pragma: no cover
8383
8484
8585# Simple in-memory event store for testing
@@ -97,7 +97,7 @@ async def store_event(self, stream_id: StreamId, message: types.JSONRPCMessage |
9797 self ._events .append ((stream_id , event_id , message ))
9898 return event_id
9999
100- async def replay_events_after (
100+ async def replay_events_after ( # pragma: no cover
101101 self ,
102102 last_event_id : EventId ,
103103 send_callback : EventCallback ,
@@ -1154,7 +1154,7 @@ async def test_streamable_http_client_session_termination(basic_server: None, ba
11541154 assert len (tools .tools ) == 10
11551155
11561156 headers : dict [str , str ] = {}
1157- if captured_session_id :
1157+ if captured_session_id : # pragma: no branch
11581158 headers [MCP_SESSION_ID_HEADER ] = captured_session_id
11591159
11601160 async with create_mcp_http_client (headers = headers ) as httpx_client :
@@ -1218,7 +1218,7 @@ async def mock_delete(self: httpx.AsyncClient, *args: Any, **kwargs: Any) -> htt
12181218 assert len (tools .tools ) == 10
12191219
12201220 headers : dict [str , str ] = {}
1221- if captured_session_id :
1221+ if captured_session_id : # pragma: no branch
12221222 headers [MCP_SESSION_ID_HEADER ] = captured_session_id
12231223
12241224 async with create_mcp_http_client (headers = headers ) as httpx_client :
@@ -1312,9 +1312,9 @@ async def run_tool():
13121312
13131313 # Now resume the session with the same mcp-session-id and protocol version
13141314 headers : dict [str , Any ] = {}
1315- if captured_session_id :
1315+ if captured_session_id : # pragma: no branch
13161316 headers [MCP_SESSION_ID_HEADER ] = captured_session_id
1317- if captured_protocol_version :
1317+ if captured_protocol_version : # pragma: no branch
13181318 headers [MCP_PROTOCOL_VERSION_HEADER ] = captured_protocol_version
13191319
13201320 async with create_mcp_http_client (headers = headers ) as httpx_client :
0 commit comments