Skip to content

Commit e4d1e88

Browse files
authored
Fix asyncio warning (#515)
why: pytest-asyncio warns when asyncio_default_fixture_loop_scope is unset in pytester-isolated runs, even when the repo-level pyproject sets it. what: - Add asyncio_mode=auto to the generated pytester pytest.ini - Add asyncio_default_fixture_loop_scope=function to the generated pytester pytest.ini - Keep test behavior unchanged while removing the deprecation warning
2 parents e44ad62 + e977757 commit e4d1e88

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Common commit types:
279279

280280
Examples:
281281
```
282-
cli/add(feat[add_repo]) Add support for custom remote URLs
282+
cli(add[repo]) Add support for custom remote URLs
283283
284284
why: Enable users to specify alternative remote URLs for repositories
285285
what:

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ $ uvx --from 'vcspull' --prerelease allow vcspull
3333
_Notes on upcoming releases will be added here_
3434
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->
3535

36+
### Tests
37+
38+
- Fix `pytest-asyncio` deprecation warning in isolated `pytester` runs by
39+
setting `asyncio_default_fixture_loop_scope` explicitly (#515)
40+
3641
## vcspull v1.54.0 (2026-02-08)
3742

3843
### Breaking changes

tests/test_fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def test_pytester_git_commit_in_isolated_run(
120120
"""
121121
[pytest]
122122
addopts=-vv
123+
asyncio_mode=auto
124+
asyncio_default_fixture_loop_scope=function
123125
""".strip(),
124126
),
125127
)

0 commit comments

Comments
 (0)