79495086

Date: 2025-03-08 21:52:18
Score: 0.5
Natty:
Report link

The event_loop fixture is deprecated in pytest-asyncio (see here). One possible approach is to use the loop_scope marker with a group of tests.

For example:

@pytest.mark.asyncio(loop_scope="session")
class MyTestGroup:
    async def test_A(self):
        ...

    async def test_B(self):
        ...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ahmelq