Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event loop scoping via scope kwarg to asyncio mark #667

Merged
merged 4 commits into from
Nov 12, 2023

Conversation

seifertm
Copy link
Contributor

@seifertm seifertm commented Nov 8, 2023

This PR removes the asyncio_event_loop mark introduced in pytest-asyncio v0.22.0. The approach is incapable of handling package and session scoped loops, which turned out to be a popular use case.

This changeset introduces an optional scope keyword argument to the existing asyncio mark as a replacement.

Resolves #657

@seifertm seifertm changed the title Asyncio mark scope kwarg Event loop scoping via scope kwarg to asyncio mark Nov 8, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (4c5e660) 94.31% compared to head (dead6b7) 94.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #667      +/-   ##
==========================================
+ Coverage   94.31%   94.72%   +0.41%     
==========================================
  Files           2        2              
  Lines         422      455      +33     
  Branches       89       92       +3     
==========================================
+ Hits          398      431      +33     
- Misses         14       15       +1     
+ Partials       10        9       -1     
Files Coverage Δ
pytest_asyncio/plugin.py 94.69% <96.15%> (+0.41%) ⬆️

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

@seifertm seifertm marked this pull request as ready for review November 10, 2023 08:27
@seifertm seifertm added this pull request to the merge queue Nov 12, 2023
Merged via the queue into pytest-dev:main with commit ee1589f Nov 12, 2023
9 checks passed
@seifertm seifertm deleted the asyncio-mark-scope-kwarg branch November 12, 2023 09:48
@seifertm seifertm restored the asyncio-mark-scope-kwarg branch November 15, 2023 14:43
@seifertm seifertm deleted the asyncio-mark-scope-kwarg branch November 22, 2023 09:54
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.

Other event loop scopes?
2 participants