How can I realize this concept of a completely new and isolated DB
environment for each single test case that's being run?
Not sure if this is a useful answer or not, but I just made starting sql
files for each of my test suites. It's an extra step but then you have a
convenient file to put
something like:
- clean _all_ your refs to SA stuff like tables, mappers etc
- sqlalchemy.orm.clear_mappers()
- metadata.drop_all()
- dbengine.dispose()
plus eventualy
del x._instance_key
del x._state
for all instances that are still around, and u want them resued in
another