|
|
|
|
|
by spockz
1954 days ago
|
|
In the article you (auxon) wrote to avoid using type based generators and unbounded collections and instead write your own generators. Usually I find it more convenient to write filters on the generated types then create my own generators. As the post mentions, this can lead to many discarded inputs.
Have you ever considered how we could use the predicates in the filters to create Specialized generators that only generate inputs that will be accepted by the filter? You probably need some meta programming or reification of the predicates for that to work. |
|
[1]: https://news.ycombinator.com/item?id=26018386
[2]: https://github.com/HypothesisWorks/hypothesis/issues/2701
edit: newlines