Creating databases in SQLAlchemy tests with PostgreSQL
问题 I am building a Pyramid web application which is built on the top of SQLAlchemy and solely relies PostgreSQL as its database backend. What would be a way to have the unit tests structure so that Database is built once per test run - not on every test setUp() as this is too slow for a complex application Database tables are (re)created as they would be created in production (e.g. run migrations from Alembic). Any unclean databases are destroyed at the start of the test run. It is possible to