(self, async_engine)
| 1171 | |
| 1172 | @async_test |
| 1173 | async def test_stream_ctxmanager(self, async_engine): |
| 1174 | async with async_engine.connect() as conn: |
| 1175 | conn = await conn.execution_options(stream_results=True) |
| 1176 | |
| 1177 | async with conn.stream(select(self.tables.users)) as result: |
| 1178 | assert not result._real_result._soft_closed |
| 1179 | assert not result.closed |
| 1180 | with expect_raises_message(Exception, "hi"): |
| 1181 | i = 0 |
| 1182 | async for row in result: |
| 1183 | if i > 2: |
| 1184 | raise Exception("hi") |
| 1185 | i += 1 |
| 1186 | assert result._real_result._soft_closed |
| 1187 | assert result.closed |
| 1188 | |
| 1189 | @async_test |
| 1190 | async def test_stream_scalars_ctxmanager(self, async_engine): |
nothing calls this directly
no test coverage detected