diff --git a/tests/logging_callback_tests/conftest.py b/tests/logging_callback_tests/conftest.py index eca0bc431a5..f74a3569c19 100644 --- a/tests/logging_callback_tests/conftest.py +++ b/tests/logging_callback_tests/conftest.py @@ -10,6 +10,16 @@ sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path import litellm +import asyncio + +@pytest.fixture(scope="session") +def event_loop(): + try: + loop = asyncio.get_running_loop() + except RuntimeError: + loop = asyncio.new_event_loop() + yield loop + loop.close() @pytest.fixture(scope="function", autouse=True)