You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
I expected it to print postgresql+psycopg2.
Actual Behavior
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/testenv/lib/python3.11/site-packages/pytest_mock_resources/container/postgres.py", line 141, in detect_driver
raise ValueError( # pragma: no cover
ValueError: No suitable driver found for Postgres. Please install `psycopg`, `psycopg2`, `asyncpg`, or explicitly configure the `drivername=` field of `PostgresConfig`.
Additional context
BTW testenv/bin/pip list confirms that psycopg2-binary is installed.
The text was updated successfully, but these errors were encountered:
Wow, that PR was opened 30 minutes before I submitted this ticket. I will claim that I searched for existing issues, didn't find one, and then spent 30 minutes composing this one. ;-)
Describe the bug
My tox.ini lists the following deps:
and
requirements.txt
hasThis used to work fine, but with recent pytest-mock-resources releases I'm getting test failures everywhere with this error:
Environment
To Reproduce
Steps to reproduce the behavior:
virtualenv testenv && testenv/bin/pip install pytest-mock-resources[postgres-binary]
testenv/bin/python -c 'from pytest_mock_resources.container.postgres import detect_driver; print(detect_driver())'
Expected behavior
I expected it to print
postgresql+psycopg2
.Actual Behavior
Additional context
BTW
testenv/bin/pip list
confirms that psycopg2-binary is installed.The text was updated successfully, but these errors were encountered: