Skip to content

Commit e55eb02

Browse files
cdeustclaude
andcommitted
fix(tests): skip the PG-driver doctor check without psycopg installed
CI caught this on Windows once PR #640 added tests_py/test_doctor.py to the curated Windows CI test list: test_pg_driver_passes_in_dev_env asserts _pg_driver().ok is True on the bare assumption "dev env has postgresql extras installed", which doesn't hold on the Windows job's requirements/ci-sqlite-min.txt (deliberately psycopg-free) -- the same assumption is false even in this repo's own local dev venv (psycopg is not importable here either), so this was never actually a dev-only edge case, just never previously exercised. mcp_server/doctor.py's own SQLITE_CHECKS explicitly excludes _pg_driver already, confirming it is not a SQLite-relevant check. Marked with tests_py/conftest.py's existing requires_psycopg marker, the same pattern already used by several sibling test files for exactly this class of dependency. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MyRfKj1vpBm2yx3sXCN8ik
1 parent e4b5ca0 commit e55eb02

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎tests_py/test_doctor.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import pytest
1717

18+
from tests_py.conftest import requires_psycopg # type: ignore
1819
from mcp_server.doctor import (
1920
CHECKS,
2021
SQLITE_CHECKS,
@@ -37,6 +38,7 @@ def test_python_version_passes_on_supported_runtime(self):
3738
# This test suite requires 3.10+ anyway
3839
assert check.ok is True
3940

41+
@requires_psycopg
4042
def test_pg_driver_passes_in_dev_env(self):
4143
check = _pg_driver()
4244
assert check.ok is True # dev env has postgresql extras installed

0 commit comments

Comments
 (0)