solved this problem by adding asyncio decorator with loop_scope="session" for each test case, like:
asyncio
loop_scope="session"
import pytest @pytest.mark.asyncio(loop_scope="session") async def test_some_func(): pass