Skip to content

Commit 68b8d72

Browse files
JP-Ellisseifertm
authored andcommitted
docs: how to set asyncio mode
When reading the docs, it wasn't clear to me how to set asyncio's mode and I had to rely on looking at the source code (or scouring `pytest --help`). I thought it would be nice to expand the docs to be more explicit in this regard. Signed-off-by: JP-Ellis <[email protected]>
1 parent 7d69b5b commit 68b8d72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/concepts.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ Assigning neighboring tests to different event loop scopes is discouraged as it
4747
Test discovery modes
4848
====================
4949

50-
Pytest-asyncio provides two modes for test discovery, *strict* and *auto*.
50+
Pytest-asyncio provides two modes for test discovery, *strict* and *auto*. This can be set through Pytest's ``--asyncio-mode`` command line flag, or through the configuration file:
5151

52+
.. code-block:: toml
53+
54+
[tool.pytest.ini_options]
55+
asyncio_mode = "auto" # or "strict"
5256
5357
Strict mode
5458
-----------

0 commit comments

Comments
 (0)