MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / setup_test

Method setup_test

test/ext/test_horizontal_shard.py:89–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

87 )
88
89 def setup_test(self):
90 global db1, db2, db3, db4
91 db1, db2, db3, db4 = self._dbs = self.dbs = self._init_dbs()
92
93 for db in (db1, db2, db3, db4):
94 self.tables_test_metadata.create_all(db)
95
96 ids = self.tables.ids
97 with db1.begin() as conn:
98 conn.execute(ids.insert(), dict(nextid=1))
99
100 self.setup_session()
101
102 @classmethod
103 def setup_session(cls):

Callers

nothing calls this directly

Calls 6

setup_sessionMethod · 0.95
create_allMethod · 0.80
_init_dbsMethod · 0.45
beginMethod · 0.45
executeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected