-
Notifications
You must be signed in to change notification settings - Fork 63
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
Lazy evaluation of Footnotes #310
Comments
@schauder Thanks for the suggestion. In principle, this looks like a useful feature to me. There's one open question, though: When in the lifecycle of a property try should the supplier's
I currently don't see an easy way out of this catch 22. Do you? I wonder if something like
would work. But that looks like it should be part of the assertions library, not of jqwik. |
Not sure how others are using Footnotes and extensions, but for my use case it would make most sense when the |
Maybe a warning could be logged when lazy footnotes are present and failure only manifests through an extension, that those don't get properly evaluated. |
Maybe that's doable, maybe it would be too complicated. Would something like
suffice for your needs? |
Absolutely. |
Planned for 1.7.2 |
Released in 1.7.2-SNAPSHOT |
Testing Problem
I'm currently doing tests related to date incompabilities with databases.
Basically I'm checking that
f(d) == fx(d)
where fx is some database operation.In case of a failure just having the result
expected 0 to be 53
is not very helpful.I'd like to have a table the function results for a range of dates around d.
This can easily done with footnotes, but if database calls are involved this can mean 1000 extra database calls which is sloooooow.
Suggested Solution
Allow footnotes to be lazy by accepting a
Supplier<String>
instead of a String.BTW: cool framework.
The text was updated successfully, but these errors were encountered: