"""Keep summarizer unit tests importable without Postgres drivers.""" from __future__ import annotations import sys from types import ModuleType if "psycopg2" not in sys.modules: fake = ModuleType("psycopg2") fake.connect = lambda **kwargs: None # type: ignore[attr-defined] sys.modules["psycopg2"] = fake