-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Excessive filtering when generating object properties #55
Comments
Fantastic issue writeup, making it very easy to fix - thanks so much! I've released 0.16.1 😁 I've patched the |
Thanks! Now hypothesis-jsonschema is working for me and finding real bugs :) |
Happy to help! I'd love to hear more about what you're doing with Hypothesis and hypothesis-jsonschema, if you've written it up somewhere? |
We integrate with poorly documented external APIs. For each API, we write a response schema and validate responses; if the API suddenly starts responding differently, this validation will fail visibly and safely, so we will know we need to look at the code again. hypothesis-jsonschema helps us test that our code is actually able to cope with data that passes that validation. As for the nature of those APIs, not sure I can talk about that. Consider them boring businessy things ;) |
Nice! The "does my code actually work for arbitrary valid data" problem is exactly what I built |
I’m bumping into the
filter_too_much
hypothesis health check.I seem to be unable to reproduce the actual health check failure on a small example, but running the following test with
--hypothesis-show-statistics
shows filtering failure events:As far as I can understand the black magic in
from_object_schema
, here’s what happens:required
properties, which is 1.maxProperties
on a schema for an object with all properties known?)min_size
(1) and on averagemin_size + 5
(6).foo
.)The filtering events go away with this trivial patch:
The text was updated successfully, but these errors were encountered: