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

Speed-up test collection for larger codebases #1020

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fahhem
Copy link

@fahhem fahhem commented Dec 23, 2024

Changes a couple places to check asyncio_mode (cheap) before _is_asyncio_fixture_function

To fix #720

@fahhem
Copy link
Author

fahhem commented Dec 23, 2024

Might also close #997

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.42%. Comparing base (38ac413) to head (d5658f5).

Files with missing lines Patch % Lines
pytest_asyncio/plugin.py 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1020   +/-   ##
=======================================
  Coverage   91.42%   91.42%           
=======================================
  Files           2        2           
  Lines         548      548           
  Branches       72       72           
=======================================
  Hits          501      501           
  Misses         28       28           
  Partials       19       19           

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

@asvetlov
Copy link
Contributor

LGTM in general.
Could you please tune the title to stress the PR main intention: it speed-ups test collection for very large code base.
The title will be a part of changelog at the end.

@fahhem fahhem changed the title Check asyncio_mode (cheap) before _is_asyncio_fixture_function Speed-up test collection for larger codebases Dec 23, 2024
@fahhem
Copy link
Author

fahhem commented Dec 23, 2024

done, thanks!

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.

Poor collection performance due to expensive iscoroutinefunction check
3 participants