diff --git a/Claude outputs/tests/test_memory.py b/Claude outputs/tests/test_memory.py index c42e168..45daece 100644 --- a/Claude outputs/tests/test_memory.py +++ b/Claude outputs/tests/test_memory.py @@ -2,7 +2,12 @@ import os import sys from unittest.mock import AsyncMock, patch, MagicMock -# Mock psycopg2 before importing main +# Mock psycopg2 before importing main to allow tests to run in environments +# where psycopg2-binary cannot be installed (e.g., local Python 3.14). +# In the documented Docker test environment (JARVIS_HANDOFF.md), psycopg2-binary +# is available, so this mocking is not needed there. Since pg_pool is only +# used at runtime in on_startup(), not during module import, this mocking +# does not affect test correctness. sys.modules["psycopg2"] = MagicMock() sys.modules["psycopg2.pool"] = MagicMock() sys.modules["psycopg2.extras"] = MagicMock()