Skip to content

Commit 9523da1

Browse files
committed
template: Add asyncio_default_fixture_loop_scope = "function" option
`pytest-asyncio` has deprecated not providing a value for the `asyncio_default_fixture_loop_scope` option. This commit adds a default value of `"function"` for this option, as it was the previous default, in the `pyproject.toml` files of this and all the generated projects. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 5e5b14d commit 9523da1

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* API projects updated the `frequenz-api-common` dependency to `0.6`.
2525
* Update the SDK dependency to `1.0.0rc901`.
2626
* Change `edit_uri` default branch to v0.x.x in mkdocs.yml.
27+
* Added a new default option `asyncio_default_fixture_loop_scope = "function"` for `pytest-asyncio` as not providing a value is deprecated.
2728

2829
## Bug Fixes
2930

cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ disable = [
197197
{%- if cookiecutter.type != "api" %}
198198
testpaths = ["tests", "src"]
199199
asyncio_mode = "auto"
200+
asyncio_default_fixture_loop_scope = "function"
200201
required_plugins = ["pytest-asyncio", "pytest-mock"]
201202
{%- else %}
202203
testpaths = ["pytests"]

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ disable = [
155155
[tool.pytest.ini_options]
156156
testpaths = ["tests", "src"]
157157
asyncio_mode = "auto"
158+
asyncio_default_fixture_loop_scope = "function"
158159
required_plugins = ["pytest-asyncio", "pytest-mock"]
159160

160161
[tool.mypy]

tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ disable = [
154154
[tool.pytest.ini_options]
155155
testpaths = ["tests", "src"]
156156
asyncio_mode = "auto"
157+
asyncio_default_fixture_loop_scope = "function"
157158
required_plugins = ["pytest-asyncio", "pytest-mock"]
158159

159160
[tool.mypy]

tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ disable = [
151151
[tool.pytest.ini_options]
152152
testpaths = ["tests", "src"]
153153
asyncio_mode = "auto"
154+
asyncio_default_fixture_loop_scope = "function"
154155
required_plugins = ["pytest-asyncio", "pytest-mock"]
155156

156157
[tool.mypy]

tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ disable = [
155155
[tool.pytest.ini_options]
156156
testpaths = ["tests", "src"]
157157
asyncio_mode = "auto"
158+
asyncio_default_fixture_loop_scope = "function"
158159
required_plugins = ["pytest-asyncio", "pytest-mock"]
159160

160161
[tool.mypy]

0 commit comments

Comments
 (0)