Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

platform independent path

Jeremiah Lowin702bc68a4c02
diff --git a/tests/server/test_server_interactions.py b/tests/server/test_server_interactions.py
index 9f588a475..94f7ebdd0 100644
--- a/tests/server/test_server_interactions.py
+++ b/tests/server/test_server_interactions.py
@@ -473,10 +473,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()