Skip to content

Commit c1aff6f

Browse files
committed
Document the asyncio debug option
1 parent 92962d1 commit c1aff6f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/reference/configuration.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ asyncio_default_test_loop_scope
1414
===============================
1515
Determines the default event loop scope of asynchronous tests. When this configuration option is unset, it default to function scope. Possible values are: ``function``, ``class``, ``module``, ``package``, ``session``
1616

17+
.. _configuration/asyncio_debug:
18+
19+
asyncio_debug
20+
=============
21+
Enables `asyncio debug mode <https://docs.python.org/3/library/asyncio-dev.html#debug-mode>`_ for the default event loop used by asynchronous tests and fixtures.
22+
23+
The debug mode can be set by the ``asyncio_debug`` configuration option in the `configuration file
24+
<https://docs.pytest.org/en/latest/reference/customize.html>`_:
25+
26+
.. code-block:: ini
27+
28+
# pytest.ini
29+
[pytest]
30+
asyncio_debug = true
31+
32+
The value can also be set via the ``--asyncio-debug`` command-line option:
33+
34+
.. code-block:: bash
35+
36+
$ pytest tests --asyncio-debug
37+
38+
Debug mode is disabled by default.
39+
1740
asyncio_mode
1841
============
1942
The pytest-asyncio mode can be set by the ``asyncio_mode`` configuration option in the `configuration file

0 commit comments

Comments
 (0)