Merge branch 'main' into return-values

This commit is contained in:
Jeremiah Lowin 2025-04-25 20:06:59 -04:00 committed by GitHub
commit ed9f0a4555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -547,10 +547,13 @@ class TestToolParameters:
assert isinstance(path, Path)
return str(path)
# Use a platform-independent path
test_path = Path("tmp") / "test.txt"
async with Client(mcp) as client:
result = await client.call_tool("send_path", {"path": "/tmp/test.txt"})
result = await client.call_tool("send_path", {"path": str(test_path)})
assert isinstance(result[0], TextContent)
assert result[0].text == "/tmp/test.txt"
assert result[0].text == str(test_path)
async def test_path_type_error(self):
mcp = FastMCP()