feat(pytest): expose pytest fixtures and helpers for pdm plugins #1594
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.
Pull Request Check List
news/
describing what is new.Describe what you have changed in this PR.
This PR follows the discussion #1571 and extract most pytest fixtures into their own public module
pdm.pytest
.This allows pdm plugin developpers to benefits from them by importing them as a plugin:
When relying on local file fixtures or any other configurable part, this is done by a dependency fixture.
The PDM test suite rely on those fixtures and configure them with PDM test fixtures (and so the PDM test suite is an usage example of those fixtures)
Given those fixtures are now in
src
, type hinting has been completed to comply with MyPy.Documentation has been added in a dedicated page to differentiate from the real PDM API. Obviously, given I didn't write those, there might be some issues with the documentation and typing.