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

Find external pytest fixtures #1879

Merged
merged 8 commits into from
Nov 11, 2022
Merged

Find external pytest fixtures #1879

merged 8 commits into from
Nov 11, 2022

Conversation

marciomazza
Copy link
Contributor

Find pytest fixtures from external plugins registered via setuptools entry points.

Using setuptools entry points is probably the main pytest mechanism of plugin discovery.

See https://docs.pytest.org/en/stable/how-to/writing_plugins.html#setuptools-entry-points

Some examples of pytest plugins installed like this are pytest-django, pytest-sugar and Faker.

This extends the functionality of #791
and maybe eliminates the need for #1786.

@codecov-commenter
Copy link

Codecov Report

Base: 94.49% // Head: 94.52% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (c243608) compared to base (8b0d391).
Patch coverage: 94.73% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1879      +/-   ##
==========================================
+ Coverage   94.49%   94.52%   +0.02%     
==========================================
  Files          80       80              
  Lines       11852    11862      +10     
==========================================
+ Hits        11200    11213      +13     
+ Misses        652      649       -3     
Impacted Files Coverage Δ
jedi/plugins/pytest.py 95.38% <94.73%> (+0.38%) ⬆️
jedi/inference/sys_path.py 94.00% <0.00%> (+0.66%) ⬆️
jedi/inference/compiled/subprocess/functions.py 73.79% <0.00%> (+1.37%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@davidhalter
Copy link
Owner

I like it. Sorry for not noticing earlier. Thanks a lot for such a high quality PR.

@davidhalter davidhalter merged commit 9723a0e into davidhalter:master Nov 11, 2022
@davidhalter
Copy link
Owner

However I doubt that it eliminates the need for and #1786, because at least in my codebases where I use imports for fixtures, no entrypoints are present.

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.

3 participants