Skip to content

Commit c48bf06

Browse files
committed
test: Add pragma no branch to streamable_http_client context manager entry to fix branch coverage on Python 3.11+
1 parent df06c15 commit c48bf06

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/shared/test_streamable_http.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2370,7 +2370,9 @@ async def mock_stream(*args: Any, **kwargs: Any):
23702370
with patch("mcp.client.streamable_http.anyio.sleep", new_callable=AsyncMock) as mock_sleep:
23712371
with pytest.raises(StreamableHTTPError) as exc_info:
23722372
with anyio.fail_after(5):
2373-
async with streamable_http_client("http://localhost:8000/mcp", http_client=client) as (
2373+
async with streamable_http_client(
2374+
"http://localhost:8000/mcp", http_client=client
2375+
) as ( # pragma: no branch
23742376
read_stream,
23752377
write_stream,
23762378
):

0 commit comments

Comments
 (0)