mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
event_loop
This commit is contained in:
parent
1002c27c40
commit
8ba0715141
1 changed files with 22 additions and 0 deletions
22
tests/image_gen_tests/conftest.py
Normal file
22
tests/image_gen_tests/conftest.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
import importlib
|
||||
import os
|
||||
import sys
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
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()
|
||||
Loading…
Add table
Reference in a new issue