mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(conftest.py): create an event loop if one isn't made
This commit is contained in:
parent
d41b84ec40
commit
9e6451e8f9
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,10 @@ def setup_and_teardown():
|
|||
# from litellm import Router, completion, aembedding, acompletion, embedding
|
||||
yield
|
||||
|
||||
# Teardown code (executes after the yield point)
|
||||
loop.close() # Close the loop created earlier
|
||||
asyncio.set_event_loop(None) # Remove the reference to the loop
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
# Separate tests in 'test_amazing_proxy_custom_logger.py' and other tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue