jedi icon indicating copy to clipboard operation
jedi copied to clipboard

Find external pytest fixtures

Open marciomazza opened this issue 3 years ago • 1 comments

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.

marciomazza avatar Sep 05 '22 20:09 marciomazza

Codecov Report

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

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%) :arrow_up:
jedi/inference/sys_path.py 94.00% <0.00%> (+0.66%) :arrow_up:
jedi/inference/compiled/subprocess/functions.py 73.79% <0.00%> (+1.37%) :arrow_up:

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

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

codecov-commenter avatar Sep 05 '22 20:09 codecov-commenter

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

davidhalter avatar Nov 11 '22 15:11 davidhalter

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.

davidhalter avatar Nov 11 '22 15:11 davidhalter