MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / main

Function main

test/typing/plain_files/orm/sessionmakers.py:73–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72
73def main() -> None:
74 fac = session_factory(engine)
75
76 with fac() as sess:
77 assert_type(sess, MySession)
78
79 with fac.begin() as sess:
80 assert_type(sess, MySession)
81
82 scoped_fac = scoped_session_factory(engine)
83
84 sess = scoped_fac()
85 assert_type(sess, MySession)
86
87
88def test_8837_sync() -> None:

Callers

nothing calls this directly

Calls 3

session_factoryFunction · 0.85
scoped_session_factoryFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected