Skip to content

Commit

Permalink
fix: also allow psycopg2-binary as a valid driver (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
willmclaren committed Apr 15, 2024
1 parent f013626 commit d3f87de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pytest_mock_resources/container/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d3f87de

Please sign in to comment.