79201514

Date: 2024-11-18 21:47:50
Score: 0.5
Natty:
Report link

For anyone else who ended up here with the same ... is bound to a different event loop error, but it's not related to FastAPI. Adding asyncio.new_event_loop() within the test fixed this for me.

e.g.

@pytest.mark.asyncio
async def test_my_func():
    asyncio.new_event_loop()
    ....
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: rrossmiller