21 lines
522 B
Python
21 lines
522 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
from fastmcp import Client
|
|
from fastmcp.client.transports import StdioTransport
|
|
from server_contract import assert_server_contract
|
|
|
|
|
|
@pytest.mark.integration
|
|
async def test_stdio_server() -> None:
|
|
transport = StdioTransport(
|
|
command=sys.executable,
|
|
args=["-m", "personal_mcp.mcp"],
|
|
cwd=str(Path(__file__).parent.parent),
|
|
keep_alive=False,
|
|
)
|
|
|
|
async with Client(transport) as client:
|
|
await assert_server_contract(client)
|