MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / test_with_server

Function test_with_server

tests/client/transports/test_memory.py:61–66  ·  view source on GitHub ↗

Test creating transport with a Server instance.

(simple_server: Server)

Source from the content-addressed store, hash-verified

59
60
61async def test_with_server(simple_server: Server):
62 """Test creating transport with a Server instance."""
63 transport = InMemoryTransport(simple_server)
64 async with transport as (read_stream, write_stream):
65 assert read_stream is not None
66 assert write_stream is not None
67
68
69async def test_with_mcpserver(mcpserver_server: MCPServer):

Callers

nothing calls this directly

Calls 1

InMemoryTransportClass · 0.90

Tested by

no test coverage detected