From 3fcb68dd8b3fcfa73b78257eef72b32f897a3e4e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 22 Aug 2025 17:23:40 -0700 Subject: [PATCH] fix logging tests --- tests/logging_callback_tests/conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)