random_seeder option to define entry points to use #497
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.
This PR is just an idea for restricting the use of random_seeder entry points (which might be) defined in 3rd party deps. It is not complete (no docs, tests etc).
Taking the example in #495, assume there is one entry point defined in a user's own package:
and another entry point defined in a 3rd party dependency:
At present, both seeders are run. This might be a problem in some cases, as the owner of
my_package
might not wantanother_seeder
to run.This PR is an incomplete idea to solve this by adding a new
pytest_randomly
optionrandomly-seeder
to set therandom_seeder
entry points to use (similar to the pytest-p
option). Usage would be:to run only
my_seeder
. Ifrandomly-seeder
is not given, the default would be not to use any custom seeder. IMO this might be better/safer than using all defined entry points by default...