MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / fixture_session

Function fixture_session

lib/sqlalchemy/testing/fixtures/orm.py:203–211  ·  lib/sqlalchemy/testing/fixtures/orm.py::fixture_session
(**kw)

Source from the content-addressed store, hash-verified

201
202
203def fixture_session(**kw):
204 kw.setdefault(class="st">"autoflush", True)
205 kw.setdefault(class="st">"expire_on_commit", True)
206
207 bind = kw.pop(class="st">"bind", config.db)
208
209 sess = orm.Session(bind, **kw)
210 _fixture_sessions.add(sess)
211 return sess
212
213
214def close_all_sessions():

Callers 15

test_coerce_noneMethod · 0.90
test_clearMethod · 0.90
test_updateMethod · 0.90
test_popMethod · 0.90
test_pop_defaultMethod · 0.90
test_pop_default_noneMethod · 0.90
test_popitemMethod · 0.90
test_setdefaultMethod · 0.90
test_replaceMethod · 0.90
test_pickle_parentMethod · 0.90

Calls 3

setdefaultMethod · 0.45
popMethod · 0.45
addMethod · 0.45

Tested by 15

test_coerce_noneMethod · 0.72
test_clearMethod · 0.72
test_updateMethod · 0.72
test_popMethod · 0.72
test_pop_defaultMethod · 0.72
test_pop_default_noneMethod · 0.72
test_popitemMethod · 0.72
test_setdefaultMethod · 0.72
test_replaceMethod · 0.72
test_pickle_parentMethod · 0.72