mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 06:54:18 +01:00
Fix hanging on streams when stdio_client exiting (#559)
This commit is contained in:
@@ -9,6 +9,13 @@ from mcp.types import JSONRPCMessage, JSONRPCRequest, JSONRPCResponse
|
||||
tee: str = shutil.which("tee") # type: ignore
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
@pytest.mark.skipif(tee is None, reason="could not find tee command")
|
||||
async def test_stdio_context_manager_exiting():
|
||||
async with stdio_client(StdioServerParameters(command=tee)) as (_, _):
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
@pytest.mark.skipif(tee is None, reason="could not find tee command")
|
||||
async def test_stdio_client():
|
||||
|
||||
Reference in New Issue
Block a user