MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_with_for_update

Function test_with_for_update

test/typing/plain_files/orm/session.py:133–147  ·  test/typing/plain_files/orm/session.py::test_with_for_update

test #9762

()

Source from the content-addressed store, hash-verified

131
132
133def test_with_for_update() -> None:
134 class="st">""class="st">"test class="cm">#9762"class="st">""
135 sess = Session()
136 ss = scoped_session(sessionmaker())
137
138 sess.get(User, 1)
139 sess.get(User, 1, with_for_update=True)
140 ss.get(User, 1)
141 ss.get(User, 1, with_for_update=True)
142
143 u1 = User()
144 sess.refresh(u1)
145 sess.refresh(u1, with_for_update=True)
146 ss.refresh(u1)
147 ss.refresh(u1, with_for_update=True)
148
149
150async def test_with_for_update_async() -> None:

Callers

nothing calls this directly

Calls 8

getMethod · 0.95
refreshMethod · 0.95
SessionClass · 0.90
scoped_sessionClass · 0.90
sessionmakerClass · 0.90
UserClass · 0.70
getMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected