Repository navigation
fix: parametrize loop factory for sync tests using async fixtures - #1636
Closed
EnesKartal wants to merge 1 commit into
Closed
EnesKartal wants to merge 1 commit into
EnesKartal wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1636 +/- ##
==========================================
+ Coverage 94.86% 95.04% +0.18%
==========================================
Files 2 2
Lines 506 525 +19
Branches 60 64 +4
==========================================
+ Hits 480 499 +19
Misses 21 21
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
pytest_generate_tests()(pytest_asyncio/plugin.py) to also parametrize_asyncio_loop_factoryfor synchronous tests that depend onpytest-asyncio-managed async fixtures, using the outermost loop scope of those async fixtures._scoped_runnerand shared async fixtures from being torn down prematurely when a sync test runs after an async test underpytest_asyncio_loop_factories.test_sync_test_with_shared_async_fixture_and_loop_factoriesintests/test_loop_factory_parametrization.py.Test Plan
.venv\Scripts\python.exe -m pytest tests/test_loop_factory_parametrization.py -q --basetemp=.pytest-tmp->41 passed.Fixes #1501