From cd96c0ba13fa3f5b8036243e897ef0c67c289d74 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Mon, 2 Jun 2025 07:48:13 +0200 Subject: [PATCH] Fixture `event_loop` got removed from `pytest-asyncio`. --- tests/test_asyncio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py index bef53009..a1eae240 100644 --- a/tests/test_asyncio.py +++ b/tests/test_asyncio.py @@ -12,7 +12,7 @@ from mocket.plugins.aiohttp_connector import MocketTCPConnector -def test_asyncio_record_replay(event_loop): +def test_asyncio_record_replay(): async def test_asyncio_connection(): reader, writer = await asyncio.open_connection( host="google.com", @@ -33,7 +33,7 @@ async def test_asyncio_connection(): with tempfile.TemporaryDirectory() as temp_dir: with Mocketizer(truesocket_recording_dir=temp_dir): - event_loop.run_until_complete(test_asyncio_connection()) + asyncio.run(test_asyncio_connection()) files = glob.glob(f"{temp_dir}/*.json") assert len(files) == 1