-
Notifications
You must be signed in to change notification settings - Fork 1
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
Icontract-hypothesis #7
Comments
Hi @H00N24, You might have noticed that icontract-hypothesis optimizes only a limited set of filters at the moment (currently only bounds and regular expressions). My plan is to infer many more strategies as rejection sampling is only viable if only edge cases need to be filtered out, which is seldomly the case in practice. Please let me know if you would like me to shift priorities and look into the search strategies for this particular project. I don't really have a testbed for icontract-hypothesis and my plan was to look at strategies haphazardly, by guessing what people might use in the wild based on what I use in my projects. IME extrapolating from my use cases tends to be wrong. Thus it would be great if we examine the practical examples of contracts from this project, prioritize them somehow and I'll try to figure out how to infer the Hypothesis search strategies from them. What do you think? @pschanely this might also be interesting for CrossHair? |
Hi @mristin, Honestly, I don't really have a plan on how to use icont-hyphotesis right now. After the brief look at the README, I thought that looks very interesting, and I should give it a thorough read. So this issue is more like an idea "backlog" for me. Unfortunately, I have quite a lot of work now, so I am unsure when I'll get to it again. Anyway, after I read more about it, I would love to speak and share ideas on how/when to use it. If you have any thoughts on your own, I would gladly hear them. |
Here's one simple idea how you can already get started with icontract-hypothesis in your tests: just pick functions which have meaningful post-conditions and handle pretty much all kinds of input, say Write this in your unit tests:
Good candidates for such functions are encode/decode pairs:
|
Try icontract-hypothesis
The text was updated successfully, but these errors were encountered: