Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Support generators for PathPropertiesConstraint and PropertyValueConstraint #7

Open
robinmackaij opened this issue Dec 6, 2021 · 0 comments

Comments

@robinmackaij
Copy link
Collaborator

Current implementation accepts lists and randomly picks an item from the list to use in the request. This means that the same value can be used multiple times during a test cycle. In some cases, this may cause issues. Supporting generators in addition to lists would allow library users to prevent such duplications.

Note: the library user will be responsible for ensuring the provided generator is not exhausted before the test suite completes.
In the advanced_use documentation, the use of itertools.cycle() should be suggested as a way to ensure all provided values are used while preventing StopIteration exceptions during test runs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant