-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Updated documentation on decorators to address the addition of …
…the loop_scope keyword argument. Signed-off-by: Michael Seifert <[email protected]>
- Loading branch information
Showing
4 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
docs/source/reference/decorators/fixture_strict_mode_example.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
docs/source/reference/decorators/pytest_asyncio_fixture_example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import pytest_asyncio | ||
|
||
|
||
@pytest_asyncio.fixture | ||
async def fixture_runs_in_fresh_loop_for_every_function(): ... | ||
|
||
|
||
@pytest_asyncio.fixture(loop_scope="session", scope="module") | ||
async def fixture_runs_in_session_loop_once_per_module(): ... | ||
|
||
|
||
@pytest_asyncio.fixture(loop_scope="module", scope="module") | ||
async def fixture_runs_in_module_loop_once_per_module(): ... | ||
|
||
|
||
@pytest_asyncio.fixture(loop_scope="module") | ||
async def fixture_runs_in_module_loop_once_per_function(): ... |