Merge pull request #835 from jlowin/fix-tests

Bump mcp 1.9.4
This commit is contained in:
Jeremiah Lowin 2025-06-14 14:20:51 -04:00 committed by GitHub
commit 349e556b15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 15 deletions

View file

@ -7,7 +7,7 @@ dependencies = [
"python-dotenv>=1.1.0",
"exceptiongroup>=1.2.2",
"httpx>=0.28.1",
"mcp>=1.9.2,<2.0.0",
"mcp>=1.9.4,<2.0.0",
"openapi-pydantic>=0.5.1",
"rich>=13.9.4",
"typer>=0.15.2",

View file

@ -1,7 +1,7 @@
import asyncio
import json
import sys
from collections.abc import Generator
from collections.abc import AsyncGenerator
import pytest
import uvicorn
@ -87,9 +87,11 @@ def run_nested_server(host: str, port: int) -> None:
server.run()
@pytest.fixture(scope="module")
def streamable_http_server() -> Generator[str, None, None]:
@pytest.fixture()
async def streamable_http_server() -> AsyncGenerator[str, None]:
with run_server_in_process(run_server, transport="streamable-http") as url:
async with Client(transport=StreamableHttpTransport(f"{url}/mcp")) as client:
assert await client.ping()
yield f"{url}/mcp"
@ -158,13 +160,3 @@ class TestTimeout:
) as client:
with pytest.raises(McpError):
await client.call_tool("sleep", {"seconds": 0.2}, timeout=0.1)
async def test_timeout_client_timeout_overrides_tool_call_timeout_if_lower(
self, streamable_http_server: str
):
with pytest.raises(McpError):
async with Client(
transport=StreamableHttpTransport(streamable_http_server),
timeout=0.1,
) as client:
await client.call_tool("sleep", {"seconds": 0.2}, timeout=2)

2
uv.lock generated
View file

@ -472,7 +472,7 @@ requires-dist = [
{ name = "authlib", specifier = ">=1.5.2" },
{ name = "exceptiongroup", specifier = ">=1.2.2" },
{ name = "httpx", specifier = ">=0.28.1" },
{ name = "mcp", specifier = ">=1.9.2,<2.0.0" },
{ name = "mcp", specifier = ">=1.9.4,<2.0.0" },
{ name = "openapi-pydantic", specifier = ">=0.5.1" },
{ name = "python-dotenv", specifier = ">=1.1.0" },
{ name = "rich", specifier = ">=13.9.4" },