From 702bc68a4c026736306026e2c41cb037171f45c3 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Fri, 25 Apr 2025 20:05:04 -0400 Subject: [PATCH] platform independent path --- tests/server/test_server_interactions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()