Skip to content

Commit e0272ab

Browse files
committed
More docs.
1 parent e768779 commit e0272ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,16 @@ when several unused TCP ports are required in a test.
110110
port1, port2 = unused_tcp_port_factory(), unused_tcp_port_factory()
111111
...
112112
113-
``async fixtures``
113+
Async fixtures
114114
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115-
Asynchronous fixtures are defined similar to ordinary pytest fixtures.
115+
Asynchronous fixtures are defined just like ordinary pytest fixtures, except they should be coroutines or asynchronous generators.
116116

117117
.. code-block:: python
118118
119119
@pytest.fixture
120120
async def async_gen_fixture():
121-
yield await asyncio.sleep(0.1)
121+
await asyncio.sleep(0.1)
122+
yield 'a value'
122123
123124
@pytest.fixture(scope='module')
124125
async def async_fixture():

0 commit comments

Comments
 (0)