Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfdecfd

Browse files
📝 Update includes in docs/en/docs/advanced/async-tests.md (#12568)
1 parent 4b9e76b commit dfdecfd

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,11 @@ For a simple example, let's consider a file structure similar to the one describ
3232

3333
The file `main.py` would have:
3434

35-
```Python
36-
{!../../docs_src/async_tests/main.py!}
37-
```
35+
{* ../../docs_src/async_tests/main.py *}
3836

3937
The file `test_main.py` would have the tests for `main.py`, it could look like this now:
4038

41-
```Python
42-
{!../../docs_src/async_tests/test_main.py!}
43-
```
39+
{* ../../docs_src/async_tests/test_main.py *}
4440

4541
## Run it
4642

@@ -60,9 +56,7 @@ $ pytest
6056

6157
The marker `@pytest.mark.anyio` tells pytest that this test function should be called asynchronously:
6258

63-
```Python hl_lines="7"
64-
{!../../docs_src/async_tests/test_main.py!}
65-
```
59+
{* ../../docs_src/async_tests/test_main.py hl[7] *}
6660

6761
/// tip
6862

@@ -72,9 +66,7 @@ Note that the test function is now `async def` instead of just `def` as before w
7266

7367
Then we can create an `AsyncClient` with the app, and send async requests to it, using `await`.
7468

75-
```Python hl_lines="9-12"
76-
{!../../docs_src/async_tests/test_main.py!}
77-
```
69+
{* ../../docs_src/async_tests/test_main.py hl[9:12] *}
7870

7971
This is the equivalent to:
8072

0 commit comments

Comments
 (0)