Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 577 Bytes

run_session_tests_in_same_loop.rst

File metadata and controls

10 lines (8 loc) · 577 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.

Note that this will also override all manually applied marks in strict mode.