π The fast, Pythonic way to build MCP servers and clients.
Skip test_multi_client on Windows (#2714)
Jeremiah Lowine8214460448c
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.ymlindex 1cbb9cbd1..89a225c3f 100644--- a/.github/workflows/run-tests.yml+++ b/.github/workflows/run-tests.yml@@ -53,7 +53,7 @@ jobs:- name: Run tests (excluding integration and client_process)run: |if [ "${{ matrix.os }}" == "windows-latest" ]; then- uv run pytest --inline-snapshot=disable tests -m "not integration and not client_process"+ uv run pytest --inline-snapshot=disable tests -m "not integration and not client_process" -velseuv run pytest --inline-snapshot=disable tests -m "not integration and not client_process" --numprocesses auto --maxprocesses 4 --dist workstealfidiff --git a/tests/test_mcp_config.py b/tests/test_mcp_config.pyindex 5a291d9d4..994e78062 100644--- a/tests/test_mcp_config.py+++ b/tests/test_mcp_config.py@@ -33,6 +33,13 @@ from fastmcp.mcp_config import ()from fastmcp.tools.tool import Tool as FastMCPTool+# Skip all tests in this file on Windows - they spawn subprocess servers via stdio+# which has process lifecycle issues on Windows+pytestmark = pytest.mark.skipif(+ sys.platform.startswith("win32"),+ reason="Windows has process lifecycle issues with stdio subprocesses",+)+def running_under_debugger():return os.environ.get("DEBUGPY_RUNNING") == "true"@@ -243,10 +250,6 @@ async def test_multi_client(tmp_path: Path):assert result_2.data == 3- sys.platform.startswith("win32"),- reason="Windows has process lifecycle issues with parallel stdio subprocess calls",-)async def test_multi_client_parallel_calls(tmp_path: Path):server_script = inspect.cleandoc("""from fastmcp import FastMCP@@ -292,8 +295,8 @@ async def test_multi_client_parallel_calls(tmp_path: Path):@pytest.mark.skipif(- running_under_debugger() or sys.platform.startswith("win32"),- reason="Debugger holds a reference to the transport; Windows has process lifecycle issues",+ running_under_debugger(),+ reason="Debugger holds a reference to the transport",)@pytest.mark.timeout(5)async def test_multi_client_lifespan(tmp_path: Path):@@ -357,10 +360,6 @@ async def test_multi_client_lifespan(tmp_path: Path):await asyncio.sleep(0.01)- sys.platform.startswith("win32"),- reason="Windows has process lifecycle issues",-)async def test_multi_client_force_close(tmp_path: Path):server_script = inspect.cleandoc("""from fastmcp import FastMCP