diff --git a/src/pytest_mock_resources/container/postgres.py b/src/pytest_mock_resources/container/postgres.py index 8cd6639..c81a913 100644 --- a/src/pytest_mock_resources/container/postgres.py +++ b/src/pytest_mock_resources/container/postgres.py @@ -135,7 +135,7 @@ def detect_driver(drivername: Optional[str] = None, async_: bool = False) -> str if any(Distribution.discover(name="asyncpg")): return "postgresql+asyncpg" else: - if any(Distribution.discover(name="psycopg2")): + if any(Distribution.discover(name="psycopg2")) or any(Distribution.discover(name="psycopg2-binary")): return "postgresql+psycopg2" raise ValueError( # pragma: no cover