Skip to content

Commit e50bc72

Browse files
committed
Redefined event loop with module scope
1 parent b023619 commit e50bc72

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_asyncio/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import asyncio
12
import random
23
from contextlib import asynccontextmanager as _asynccontextmanager
34
from typing import Union
@@ -275,3 +276,10 @@ def redis_url(request):
275276
def connect_args(request):
276277
url = request.config.getoption("--redis-url")
277278
return parse_url(url)
279+
280+
281+
@pytest.fixture(scope="module")
282+
def event_loop():
283+
loop = asyncio.get_event_loop()
284+
yield loop
285+
loop.close()

0 commit comments

Comments
 (0)