Skip to content

Fix asyncio warning#515

Merged
tony merged 3 commits intomasterfrom
pytest-asyncio-warning
Feb 14, 2026
Merged

Fix asyncio warning#515
tony merged 3 commits intomasterfrom
pytest-asyncio-warning

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented Feb 14, 2026

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

…ated pytester ini

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
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.54%. Comparing base (e44ad62) to head (e977757).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #515   +/-   ##
=======================================
  Coverage   81.54%   81.54%           
=======================================
  Files          16       16           
  Lines        2254     2254           
  Branches      473      473           
=======================================
  Hits         1838     1838           
  Misses        266      266           
  Partials      150      150           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony changed the title tests/fixtures(fix[pytester_asyncio]): Set asyncio loop scope in isolated pytester ini tests(pytester_asyncio) Set asyncio loop scope in isolated pytester ini Feb 14, 2026
why: Keep unreleased changelog aligned with merged work so release notes include test stability updates.

what:
- Add an unreleased Tests entry for PR #515
- Document the pytester isolated-run fix for pytest-asyncio deprecation warning
@tony tony changed the title tests(pytester_asyncio) Set asyncio loop scope in isolated pytester ini Fix asyncio warning Feb 14, 2026
@tony tony marked this pull request as ready for review February 14, 2026 17:02
@tony tony merged commit e4d1e88 into master Feb 14, 2026
9 checks passed
@tony tony deleted the pytest-asyncio-warning branch February 14, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant