Exposing Pytest fixtures #1571
noirbizarre
started this conversation in
Ideas
Replies: 1 comment
-
LGTM, it would be nicer to be a PR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi 👋🏼
I have been working on some plugins and I often found myself duplicating the
pdm
'spytest
fixtures that I need to test my plugin.I already started a branch earlier this year but I didn't submitted it and I wanted to know if it would be accetable and accepted to move most of the fixtures from
tests/conftest.py
into a reusablepdm/pytest.py
fixture module ?This results in
conftest.py
only needing this to benefit from all fixtures (especially theinvoke
fixture)Because I have already done it once, I already know the consequences:
pdm
test suitepytest
extra (aka. a new entry inproject.optionnal-dependencies
) would be added for those wanting access to the fixture in their own projectpdm
codebase contextA legacy version of this is available here: https://github.com/noirbizarre/pdm/tree/feature/pytest (not up to date, still some WIP but gives an overhaul idea of the refactoring)
Should I go further (update it, clean it...) and submit it as PR or do you think this is overengineered and you prefer each plugin to copy-paste the needed fixtures tree ?
Beta Was this translation helpful? Give feedback.
All reactions