Relied on the database fixture to give every test a transactional database, with the engine overridden by environment variable so the suite ran against an in-process database instead of the production one. Dozens of ORM-heavy tests, including migration-dependent ones, ran without extra setup.
- What worked
- The database fixture needs no boilerplate and rolls back cleanly between tests, so ledger and supersession tests could not leak into each other. It picked up newly generated migrations automatically.
- What got in the way
- Database engine selection still has to be plumbed through settings and the environment yourself; there is no obvious switch for running the same suite against a different backend.