We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f551715 commit bac04d2Copy full SHA for bac04d2
tests/test_mcp_resources.py
@@ -0,0 +1,26 @@
1
+from __future__ import annotations
2
+
3
+from pathlib import Path
4
+import sys
5
6
+import pytest
7
8
+ROOT = Path(__file__).resolve().parents[1]
9
+SITE_PACKAGES = ROOT / ".venv" / "lib" / "python3.13" / "site-packages"
10
+if SITE_PACKAGES.exists():
11
+ sys.path.append(str(SITE_PACKAGES))
12
13
+pytest.importorskip("mcp.server.fastmcp")
14
15
+from pdf2sqlite.mcp_server.config import ServerConfig
16
+from pdf2sqlite.mcp_server.server import build_server
17
18
19
+def test_server_builds_with_resource_templates() -> None:
20
+ db_path = Path("docs.db").resolve()
21
+ if not db_path.exists():
22
+ pytest.skip("docs.db fixture missing")
23
24
+ config = ServerConfig(database_path=db_path)
25
26
+ build_server(config)
0 commit comments