Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" -v
else
uv run pytest --inline-snapshot=disable tests -m "not integration and not client_process" --numprocesses auto --maxprocesses 4 --dist worksteal
fi
Expand Down
19 changes: 9 additions & 10 deletions tests/test_mcp_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
)
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"
Expand Down Expand Up @@ -243,10 +250,6 @@ def add(a: int, b: int) -> int:
assert result_2.data == 3


@pytest.mark.skipif(
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
Expand Down Expand Up @@ -292,8 +295,8 @@ def add(a: int, b: int) -> int:


@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):
Expand Down Expand Up @@ -357,10 +360,6 @@ def pid() -> int:
await asyncio.sleep(0.01)


@pytest.mark.skipif(
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
Expand Down