diff --git a/docs/source/how-to-guides/index.rst b/docs/source/how-to-guides/index.rst new file mode 100644 index 00000000..922fac91 --- /dev/null +++ b/docs/source/how-to-guides/index.rst @@ -0,0 +1,10 @@ +============= +How-To Guides +============= + +.. toctree:: + :hidden: + + uvloop + +This section of the documentation provides code snippets and recipes to accomplish specific tasks with pytest-asyncio. diff --git a/docs/source/how-to-guides/uvloop.rst b/docs/source/how-to-guides/uvloop.rst new file mode 100644 index 00000000..14353365 --- /dev/null +++ b/docs/source/how-to-guides/uvloop.rst @@ -0,0 +1,13 @@ +======================= +How to test with uvloop +======================= + +Replace the default event loop policy in your *conftest.py:* + +.. code-block:: python + + import asyncio + + import uvloop + + asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) diff --git a/docs/source/index.rst b/docs/source/index.rst index e6b33033..a5096c56 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,6 +7,7 @@ Welcome to pytest-asyncio! :hidden: concepts + how-to-guides/index reference/index support