fastmcp/tests
William Easton 7ef5a14d6b
Add doc example validation test (syntax + import checks)
Uses pytest-examples to extract 1,448 Python code blocks from
docs/*.mdx and checks:
- Syntax: every example parses as valid Python
- Imports: every `from fastmcp.x import y` resolves

Current baseline (26 known failures):
- 8 syntax errors (error output as python, unquoted URLs, f-string backticks)
- 18 broken imports (renamed classes, wrong module paths, removed features)

Baselines ratchet down as doc examples are fixed.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 09:49:48 -05:00
..
apps Validate actual base64 data size in FileUpload, not client-reported size (#3816) 2026-04-11 11:23:49 -04:00
cli Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
client Harden client tool result error handling (#3778) 2026-04-08 13:57:10 -04:00
conformance Run MCP conformance tests in CI (#3628) 2026-03-26 22:19:13 -04:00
contrib fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
deprecated fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
docs Add doc example validation test (syntax + import checks) 2026-04-12 09:49:48 -05:00
experimental Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
fs fix: filesystem provider import machinery (#3626) 2026-03-26 17:53:12 -04:00
integration_tests Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
prompts Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
resources Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
server fix: materialize generators before result conversion, handle bytes gracefully (#3830) 2026-04-11 11:23:51 -04:00
telemetry Use standard traceparent/tracestate keys per OTel MCP semconv (#3221) 2026-02-18 15:51:24 -05:00
tools fix: TransformedTool sync fn crash and schema mutation (#3823) 2026-04-11 11:50:23 -04:00
utilities Fix json_schema_to_type crashes on keywords, boolean schemas, empty enums, and name collisions (#3818) 2026-04-11 11:29:26 -04:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
test_apps.py Add PrefabAppConfig for customizable Prefab tool setup (#3648) 2026-03-27 10:08:48 -04:00
test_apps_prefab.py Add GenerativeUI provider, bump prefab-ui 0.14.0 (#3647) 2026-03-27 09:20:40 -04:00
test_fastmcp_app.py fix: remove CSP from tool metadata, keep on resource only (#3754) 2026-04-03 10:22:33 -04:00
test_json_schema_generation.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_mcp_config.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00