Skip to content

Commit 2774496

Browse files
authored
Add test_stdio_cm for stdin_writer hanging
1 parent 22e2b3a commit 2774496

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/client/test_stdio_cm.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import pytest
2+
3+
from mcp import StdioServerParameters
4+
from mcp.client.stdio import stdio_client
5+
6+
MCP_SERVER = {
7+
"command": "uvx",
8+
"args": ["mcp-server-fetch"],
9+
}
10+
11+
12+
@pytest.mark.anyio
13+
async def test_context_manager_exiting():
14+
async with stdio_client(StdioServerParameters(**MCP_SERVER)) as (
15+
read_stream,
16+
write_stream,
17+
):
18+
pass

0 commit comments

Comments
 (0)