Skip to content

Instantly share code, notes, and snippets.

@sidravic
Created October 13, 2022 04:27
import asyncio
import pytest
@pytest.fixture(scope='session')
def event_loop():
"""
Creates an instance of the default event loop for the test session.
"""
policy = asyncio.get_event_loop_policy()
loop = policy.new_event_loop()
yield loop
loop.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment