Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add how-to guide for testing with uvloop #588

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/source/how-to-guides/index.rst
Original file line number Diff line number Diff line change
@@ -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.
13 changes: 13 additions & 0 deletions docs/source/how-to-guides/uvloop.rst
Original file line number Diff line number Diff line change
@@ -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())
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Welcome to pytest-asyncio!
:hidden:

concepts
how-to-guides/index
reference/index
support

Expand Down