Skip to content

Commit af3adc5

Browse files
committed
[docs] Added how-to guide for testing with uvloop.
Signed-off-by: Michael Seifert <[email protected]>
1 parent 5731bd2 commit af3adc5

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

docs/source/how-to-guides/index.rst

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=============
2+
How-To Guides
3+
=============
4+
5+
.. toctree::
6+
:hidden:
7+
8+
uvloop
9+
10+
This section of the documentation provides code snippets and recipes to accomplish specific tasks with pytest-asyncio.

docs/source/how-to-guides/uvloop.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======================
2+
How to test with uvloop
3+
=======================
4+
5+
Replace the default event loop policy in your *conftest.py:*
6+
7+
.. code-block:: python
8+
9+
import asyncio
10+
11+
import uvloop
12+
13+
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

docs/source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Welcome to pytest-asyncio!
77
:hidden:
88

99
concepts
10+
how-to-guides/index
1011
reference/index
1112
support
1213

0 commit comments

Comments
 (0)