Fix regression that prevents async fixtures from working in sync tests#287
Conversation
… sync tests. The commit simply processes all async fixtures of a test regardless of whether the test is an async function or not. Closes pytest-dev#286 Signed-off-by: Michael Seifert <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #287 +/- ##
=======================================
Coverage 92.61% 92.61%
=======================================
Files 3 3
Lines 271 271
Branches 39 39
=======================================
Hits 251 251
Misses 12 12
Partials 8 8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
asvetlov
left a comment
There was a problem hiding this comment.
LGTM!
Thanks for the fix, my fault.
There are too many combinations between sync and async code :)
|
Please let me merge and make a new release right now. |
@asvetlov No worries. If someone has time to look at these things within a week, I'm already pretty happy :) A new release sounds good! |
|
@asvetlov The tag that being built was |
The function
_preprocess_async_fixturesdoes nothing if the fixture is not an async function. The change simply prepares all async fixtures of a test regardless of whether the test is an async function or not.Do you see any harm in doing so?
This should fix the issue encountered in #286.