Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 495 Bytes

run_session_tests_in_same_loop.rst

File metadata and controls

8 lines (7 loc) · 495 Bytes

How to run all tests in the session in the same event loop

All tests can be run inside the same event loop by marking them with pytest.mark.asyncio(scope="session"). The easiest way to mark all tests is via a pytest_collection_modifyitems hook in the conftest.py at the root folder of your test suite.