-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass max-tries to such-that #5
Comments
The best option here (when you have a constraint that's hard to satisfy via random generation) is to pass a custom generator into the generation process for the constrained schema which always produces values that satisfy the constraints. |
Ok thanks, let me check the tests first, I am now familiar with leaf generator. I just need to know in my case which is the leaf, I guess |
I would recommend |
Very often I receive the dreaded:
Especially with this schema:
I was checking and
such-that
can increase the number of tries:https://clojure.github.io/test.check/clojure.test.check.generators.html#var-such-that
Maybe we can have a dynamic var to pass in there?
PS: Is the above a good way to handle that case? I am still pretty new to
schema
.The text was updated successfully, but these errors were encountered: