Browse Source

Remove code examples for Python 3.8 in `async_tests`

pull/14510/head
Yurii Motov 7 months ago
parent
commit
b3a3ebba6f
  1. 8
      docs/en/docs/advanced/async-tests.md
  2. 0
      docs_src/async_tests/app_a_py39/__init__.py
  3. 0
      docs_src/async_tests/app_a_py39/main.py
  4. 0
      docs_src/async_tests/app_a_py39/test_main.py
  5. 2
      tests/test_tutorial/test_async_tests/test_main_a.py

8
docs/en/docs/advanced/async-tests.md

@ -32,11 +32,11 @@ For a simple example, let's consider a file structure similar to the one describ
The file `main.py` would have:
{* ../../docs_src/async_tests/main.py *}
{* ../../docs_src/async_tests/app_a_py39/main.py *}
The file `test_main.py` would have the tests for `main.py`, it could look like this now:
{* ../../docs_src/async_tests/test_main.py *}
{* ../../docs_src/async_tests/app_a_py39/test_main.py *}
## Run it { #run-it }
@ -56,7 +56,7 @@ $ pytest
The marker `@pytest.mark.anyio` tells pytest that this test function should be called asynchronously:
{* ../../docs_src/async_tests/test_main.py hl[7] *}
{* ../../docs_src/async_tests/app_a_py39/test_main.py hl[7] *}
/// tip
@ -66,7 +66,7 @@ Note that the test function is now `async def` instead of just `def` as before w
Then we can create an `AsyncClient` with the app, and send async requests to it, using `await`.
{* ../../docs_src/async_tests/test_main.py hl[9:12] *}
{* ../../docs_src/async_tests/app_a_py39/test_main.py hl[9:12] *}
This is the equivalent to:

0
docs_src/async_tests/app_a_py39/__init__.py

0
docs_src/async_tests/main.py → docs_src/async_tests/app_a_py39/main.py

0
docs_src/async_tests/test_main.py → docs_src/async_tests/app_a_py39/test_main.py

2
tests/test_tutorial/test_async_tests/test_main.py → tests/test_tutorial/test_async_tests/test_main_a.py

@ -1,6 +1,6 @@
import pytest
from docs_src.async_tests.test_main import test_root
from docs_src.async_tests.app_a_py39.test_main import test_root
@pytest.mark.anyio
Loading…
Cancel
Save