Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 531 Bytes

run_package_tests_in_same_loop.rst

File metadata and controls

11 lines (9 loc) · 531 Bytes

How to run all tests in a package in the same event loop

All tests can be run inside the same event loop by marking them with pytest.mark.asyncio(scope="package"). Add the following code to the __init__.py of the test package:

Note that this marker is not passed down to tests in subpackages. Subpackages constitute their own, separate package.