Skip to content

Commit 12c49b0

Browse files
committed
Fix
1 parent e46a978 commit 12c49b0

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

aiohttp/pytest_plugin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ def _passthrough_loop_context(
199199
else:
200200
# this shadows loop_context's standard behavior
201201
loop = setup_test_loop()
202-
yield loop
203-
teardown_test_loop(loop, fast=fast)
202+
try:
203+
yield loop
204+
finally:
205+
teardown_test_loop(loop, fast=fast)
204206

205207

206208
def pytest_pycollect_makeitem(collector, name, obj): # type: ignore[no-untyped-def]

tests/test_connector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ async def test_async_context_manager() -> None:
303303
assert conn is c
304304

305305
assert conn.closed
306-
del conn
307306

308307

309308
async def test_close(key: ConnectionKey) -> None:

0 commit comments

Comments
 (0)