Hypothesis phase settings
See original GitHub issueOverview
Expose hypothesis
phase settings via the config file and (maybe) disable shrinking
by default.
Specification
Add the following values to the default configuration.
hypothesis:
phases:
explicit: true
reuse: true
generate: true
target: true
shrink: false
There is a slight complexity here because this deviates from how hypothesis handles this setting natively. But we have to build the enum regardless, so this feels like a good approach imo.
re: disabling shrinking by default - this is the reason I need this setting exposed. As soon as shrinking begins, the max_examples
value is now ignored… if you’re using sufficiently complex strategies or a state machine, the process can be very slow. There is definitely a value in producing a minimal example, but given the environment we’re using hypothesis in I’m not sure if this behavior is more often good or harmful. cc @fubuloubu - any thoughts?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
I meant more to explore the logic of similar shrinking strategies (like strings) and try to adapt it so it’s fast to shrink
It’d probably make more sense to do a CLI flag in that case