Skip to content

Commit c16cdcf

Browse files
Add necessary configuration files for tests and checks
1 parent 75f0103 commit c16cdcf

File tree

5 files changed

+48
-5
lines changed

5 files changed

+48
-5
lines changed

tests/pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
[tool.poetry]
3+
name = "python-sdk"
4+
version = "0.0.1"
5+
description = "Python SDK"
6+
authors = ["Your Name <youremail@example.com>"]
7+
8+
[tool.poetry.dependencies]
9+
python = "^3.13"
10+
pydantic = "^2.7"
11+
httpx = "^0.23"
12+
13+
[tool.poetry.dev-dependencies]
14+
pytest = "^8.3.5"
15+
ruff = "^0.11.8"
16+
mypy = "^1.15.0"

tests/requirements-dev.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
fastapi
2-
httpx
3-
uvicorn
4-
sse-starlette
5-
anyio
1+
2+
pytest
3+
ruff
4+
mypy

tests/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
pydantic
3+
httpx
4+
mcp

tests/run_checks.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
# Run lint checks
3+
ruff .
4+
5+
# Run tests
6+
pytest
7+
8+
# Run type checks
9+
mypy src/ tests/

tests/test_prompts.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
import pytest
3+
from mcp.server.fastmcp import FastMCP
4+
5+
@pytest.mark.asyncio
6+
async def test_get_prompt_returns_description():
7+
mcp = FastMCP("TestApp")
8+
9+
@mcp.prompt()
10+
def sample_prompt():
11+
"""This is a sample prompt description."""
12+
return "Sample prompt content."
13+
14+
prompt_info = await mcp.get_prompt("sample_prompt")
15+
assert prompt_info["description"] == "This is a sample prompt description."

0 commit comments

Comments
 (0)