def setUp(self): AssertDB.setUp(self) self.connection = sqlite3.connect(':memory:') cursor = self.connection.cursor() # Enables foreign_keys support in sqlite cursor.execute("PRAGMA foreign_keys = ON") self.connection.commit() # See the assert at the beginning of this module: # sqlite3.paramstyle == 'qmark' # This means the module uses '?' as the SQL parameter format. self.db = SequencerSQLDB(SQLiteDB('memory', self.connection)) self.db.create_table()
def setUp(self): AssertDB.setUp(self) self.basedir = tempfile.mkdtemp(suffix='tmp', prefix='testfiledb') self.db = SequencerFileDB(self.basedir) self.db.create_table()