def setup_test(self): _sessions.clear() clear_mappers() # enable query caching, however make the cache small so that # the tests don't take too long. issues w/ caching include making # sure sessions don't get stuck inside of it. However it will # make tests like test_mapper_reset take a long time because mappers # are very much a part of what's in the cache. self.engine = engines.testing_engine( options={"use_reaper": False, "query_cache_size": 10} )
def teardown(self): from sqlalchemy.orm.session import _sessions _sessions.clear() super(DisposedStates, self).teardown()
def setup(self): _sessions.clear() _mapper_registry.clear() self.engine = engines.testing_engine(options={"use_reaper": False})
def setUp(self): _sessions.clear() _mapper_registry.clear()
def setup(self): _sessions.clear() _mapper_registry.clear()