schireson / pytest-mock-resources

Pytest Fixtures that let you actually test against external resource (Postgres, Mongo, Redshift...) dependent code.
https://pytest-mock-resources.readthedocs.io/en/latest/quickstart.html
MIT License
179 stars 19 forks source link

psycopg2 is secretly required #63

Closed DanCardin closed 5 years ago

DanCardin commented 5 years ago

Describe the bug depending on pytest-mock-resources requires you to also have psycopg2 in your environment. A previous PR (I think) removed the setup.py install requirement (because not every consumer will use pg); but we still perform imports of psycopg2 which cause those imports to fail.

Expected behavior psycopg2 should remain an optional extra, but we should guard the imports such that it allows users to not have it installed.