Apply loop factories when asyncio is marked via parametrize - #1551
Closed
gyanu2507 wants to merge 1 commit into
Closed
Apply loop factories when asyncio is marked via parametrize#1551gyanu2507 wants to merge 1 commit into
gyanu2507 wants to merge 1 commit into
Conversation
pytest.param(..., marks=pytest.mark.asyncio) was ignored when selecting pytest_asyncio_loop_factories.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1551 +/- ##
==========================================
- Coverage 94.50% 92.62% -1.89%
==========================================
Files 2 2
Lines 510 529 +19
Branches 62 71 +9
==========================================
+ Hits 482 490 +8
- Misses 22 26 +4
- Partials 6 13 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tjkuson
requested changes
Aug 30, 2026
tjkuson
left a comment
Contributor
There was a problem hiding this comment.
Thank you for the PR, but this doesn't seem to address the issues I raised under the original issue. Specifically, this seems to break code which mixes asyncio and trio markers. #1463 (comment)
Author
|
You're right — this also wraps the trio param set. Closing; a proper fix needs the pytest API you pointed at. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pytest_generate_testsonly looked at the function's own asyncio marker, so this never picked up loop factories:Also convert those functions during collection so strict mode still owns them.
Fixes #1463.