def teardown_test(self): for db in self.dbs: db.connect().invalidate() testing_reaper.checkin_all() for i in range(1, 3): os.remove("shard%d_%s.db" % (i, provision.FOLLOWER_IDENT))
def teardown_test(self): clear_mappers() # the tests in this suite don't cleanly close out the Session # at the moment so use the reaper to close all connections testing_reaper.checkin_all() for i in [1, 3]: os.remove("shard%d_%s.db" % (i, provision.FOLLOWER_IDENT)) with self.postgresql_engine.begin() as conn: self.tables_test_metadata.drop_all(conn) for i in [2, 4]: conn.exec_driver_sql("DROP SCHEMA shard%s CASCADE" % (i, )) self.postgresql_engine.dispose()
def teardown_test(self): testing_reaper.checkin_all() for i in range(1, 5): os.remove("shard%d_%s.db" % (i, provision.FOLLOWER_IDENT))