mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
(ci/cd) fix event loop bug proxy_test
This commit is contained in:
parent
250672eddc
commit
3bb49447bc
1 changed files with 10 additions and 10 deletions
|
@ -58,18 +58,18 @@ save_worker_config(
|
|||
import asyncio
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def event_loop():
|
||||
"""Create an instance of the default event loop for each test case."""
|
||||
policy = asyncio.WindowsSelectorEventLoopPolicy()
|
||||
res = policy.new_event_loop()
|
||||
asyncio.set_event_loop(res)
|
||||
res._close = res.close
|
||||
res.close = lambda: None
|
||||
# @pytest.fixture
|
||||
# def event_loop():
|
||||
# """Create an instance of the default event loop for each test case."""
|
||||
# policy = asyncio.WindowsSelectorEventLoopPolicy()
|
||||
# res = policy.new_event_loop()
|
||||
# asyncio.set_event_loop(res)
|
||||
# res._close = res.close
|
||||
# res.close = lambda: None
|
||||
|
||||
yield res
|
||||
# yield res
|
||||
|
||||
res._close()
|
||||
# res._close()
|
||||
|
||||
|
||||
# Here you create a fixture that will be used by your tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue