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

feat: Support non-session scoped containers. #150

Closed DanCardin closed 2 years ago

DanCardin commented 2 years ago

In an effort to enable tests which operate at the whole-database level (interacting with roles/permissions/multiple databases/etc), non-session scoped container fixtures will enable per-test containers.

Additionally, opting out of a specific port enables dynamic port selection which enables this feature to still work correctly in multiprocess tests.

Currently this feature is experimental, and thus undocumented.