File tree 3 files changed +28
-0
lines changed
3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change
1
+ =======================
2
+ How to test with uvloop
3
+ =======================
4
+
5
+ Create the following autouse fixture in your *conftest.py: *
6
+
7
+ .. code-block :: python
8
+
9
+ import asyncio
10
+
11
+ import pytest
12
+ import uvloop
13
+
14
+
15
+ @pytest.fixture (scope = " session" , autouse = True )
16
+ def event_loop_policy ():
17
+ asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Welcome to pytest-asyncio!
7
7
:hidden:
8
8
9
9
concepts
10
+ how-to-guides/index
10
11
reference/index
11
12
support
12
13
You can’t perform that action at this time.
0 commit comments