MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_close_all

Method test_close_all

test/ext/asyncio/test_session.py:132–149  ·  view source on GitHub ↗
(self, async_engine)

Source from the content-addressed store, hash-verified

130
131 @async_test
132 async def test_close_all(self, async_engine):
133 User = self.classes.User
134
135 s1 = AsyncSession(async_engine)
136 u1 = User()
137 s1.add(u1)
138
139 s2 = AsyncSession(async_engine)
140 u2 = User()
141 s2.add(u2)
142
143 in_(u1, s1)
144 in_(u2, s2)
145
146 await close_all_sessions()
147
148 not_in(u1, s1)
149 not_in(u2, s2)
150
151 @async_test
152 async def test_session_close_all_deprecated(self, async_engine):

Callers

nothing calls this directly

Calls 6

addMethod · 0.95
AsyncSessionClass · 0.90
in_Function · 0.90
close_all_sessionsFunction · 0.90
not_inFunction · 0.90
UserClass · 0.50

Tested by

no test coverage detected