Skip to content

Commit 677f6af

Browse files
[PR #8714/8690b0fb backport][3.10] Minor improvements to testing docs (#8715)
**This is a backport of PR #8714 as merged into master (8690b0f).** --------- Co-authored-by: Sam Bull <git@sambull.org>
1 parent 58e8597 commit 677f6af

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

docs/testing.rst

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,6 @@ insert ``pytest_plugins = 'aiohttp.pytest_plugin'`` line into
3232

3333

3434

35-
Provisional Status
36-
~~~~~~~~~~~~~~~~~~
37-
38-
The module is a **provisional**.
39-
40-
*aiohttp* has a year and half period for removing deprecated API
41-
(:ref:`aiohttp-backward-compatibility-policy`).
42-
43-
But for :mod:`aiohttp.test_tools` the deprecation period could be reduced.
44-
45-
Moreover we may break *backward compatibility* without *deprecation
46-
period* for some very strong reason.
47-
48-
4935
The Test Client and Servers
5036
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5137

@@ -76,14 +62,19 @@ Pytest
7662
The :data:`aiohttp_client` fixture available from pytest-aiohttp_ plugin
7763
allows you to create a client to make requests to test your app.
7864

79-
A simple would be::
65+
To run these examples, you need to use `--asyncio-mode=auto` or add to your
66+
pytest config file::
67+
68+
asyncio_mode = auto
69+
70+
A simple test would be::
8071

8172
from aiohttp import web
8273

8374
async def hello(request):
8475
return web.Response(text='Hello, world')
8576

86-
async def test_hello(aiohttp_client, loop):
77+
async def test_hello(aiohttp_client):
8778
app = web.Application()
8879
app.router.add_get('/', hello)
8980
client = await aiohttp_client(app)

0 commit comments

Comments
 (0)