Support generators for PathPropertiesConstraint and PropertyValueConstraint
robinmackaij opened this issue · 0 comments
robinmackaij commented
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 ofitertools.cycle()
should be suggested as a way to ensure all provided values are used while preventing StopIteration exceptions during test runs.